$date2 = ‘2010-06-20’;$date1 = ‘2010-06-24’;$days = (strtotime($date1) – strtotime($date2)) / (60 * 60 * 24);echo $days; some other ways are also there. can any one … days difference in phpRead more
Month: July 2010
Get extension of filename in php
$path_info = pathinfo(‘lib.inc.php’); echo $path_info[‘extension’];
Validate Image Using Javascript
function validate_image(){ frmobj = document.frmRegistration; //Here “frmRegistration” is Form name var image_file = frmobj.upload_file.value; /*Here “upload_file” is in this tag like input type=”file” name=”upload_file” */ … Validate Image Using JavascriptRead more
create dynamic images in php
//Create Image By Url Method – 2function create_image_by_url2($url){ $path_parts = pathinfo($url); copy($url,$path_parts[‘basename’]); }create_image_by_url2($url);
create dynamic images using php
$url = “http://technmarketing.com/wp-content/uploads/2009/03/twitter-wallpaper2.jpg”; //Create Image By Url Method – 1function create_image_by_url1($url){ $target_path = $url; $imgdir=””; $path_parts = pathinfo($url); $file_name = $path_parts[‘basename’]; $imgext = $path_parts[‘extension’]; if($imgext==’jpg’ … create dynamic images using phpRead more