I need to cut a recordset from say image.jpg to jpg. How do I cut the front part of or get left with the back part. This is what I have
<? echo $row["CFILENAME"];?>
Please add the right code or contact me with advice at werner@soltec.co.za
Here is your code
<? $name=$row["CFILENAME"]; $img=substr($name,strlen($name)-3,3); echo $img; ?>
You could use explode:
<?
<? $name=$row["CFILENAME"]; // put filename in variable $img=explode('.",$name); // explode on the period "." and puts the result in an array echo $img[1]; // echo out part of array you want ?>