Re: string conversion
| From: | Jason G. | Date: | Fri, 21 Sep 2001 02:54:52 +0000 |
| Subject: | Re: string conversion | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-68102@lists.php.net to get a copy of this message | ||
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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net