Sorry,
In this case, use explode() instead of split() ...
Andras,
$aRay = split('.', 'mypicture.jpg');
$aRay[0] will be the filename
$aRay[1] will be the extension
-Jason Garber
www.deltacron.com
At 03:14 PM 9/20/2001 -0700, Andras Kende wrote:
>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
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]