Re: [PHP] String conversion function

2003-07-09 Thread Pascal Polleunus
Simon Fredriksson wrote: I'm wondering if there's any easy way to convert special chars to the numerical version of it. Like space converts to %20 and slash (/) to %2F. rawurlencode is what you're looking for -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP] string conversion

2001-09-20 Thread Jason G.
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 s

Re: [PHP] string conversion

2001-09-20 Thread Philip Olson
hi andras- consider the strstr() and strrstr() functions : $str = 'abcabc'; print strpos ($str,'b'); // 1 print strrpos($str,'b'); // 4 these positions can be used with other functions, such as substr() : $str = 'abc.png'; print strpos($str,'.');// 3 print

Re: [PHP] string conversion

2001-09-20 Thread Jason G.
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