I am trying to incorperate some PHP to strip hyphens and remove the last 4 digits from a string to display image files in a pretty way. The PHP goes like the following:
Code: Select all
$name = str_replace('_',' ',{$field.value});
$name = substr($name,0,-4);
echo $name;
Can someone explain to me the proper way to do this please, I'm going round the bend!
Many Thanks