string conversion
| From: | Andras Kende | Date: | Thu, 20 Sep 2001 22:14:51 +0000 |
| Subject: | string conversion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-68083@lists.php.net to get a copy of this message | ||
Hi,
I trying to cut the last 4 char of a string but sometimes its cut 3 sometime
4 char....
$pic1=$amyrow["picture"];
$pic2 = substr("$pic1", 0, -4);
Actually I have some pictures where I need to cut off the extensions...
amamm.jpg
33.jpg
321.gif
to
amamm
33
321
Is any other way than substr to do this ??
Thanks
Andras