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
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.
//Simon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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
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
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
6 matches
Mail list logo