hi all i have a string that is produced like this. this is a field in my database called url
76106414345minus_01.jpg
what i want to do is trim the last 12 characters off
so it will look like this
$img_tag = (the output)76106414345
and write a variable to hold this so i can delete it using this.
$file = '/usr/local/websites/realestate/www/img/property/'. $img_tag.'minus_00.jpg';
$file1 = '/usr/local/websites/realestate/www/img/property/'. $img_tag.'minus_01.jpg';
$file2 = '/usr/local/websites/realestate/www/img/property/'. $img_tag.'minus_02.jpg';
$file3 = '/usr/local/websites/realestate/www/img/property/'. $img_tag.'minus_03.jpg';
unlink($file);
unlink($file1);
unlink($file2);
unlink($file3);
see 1 image url is stored in the database but there are 4 images on the server. so instead of having 4 fields ill just trim the last 12 characters off and write the other 3 sets of images through code.
cheers aron.