|
Posted by Justin Koivisto on 07/11/05 19:19
Gonzillaaa wrote:
> If I have a string such as "/ Support us / Volunteering" how do I get
> rid of the first slash and not both of them? I had a go at ltrim but
> with no success. $path = ltrim($path, "/")
>
>
> Thanks,
>
$path=preg_replace('`/\s*`','',$path,1);
http://www.php.net/preg_replace
HTH
--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com
Navigation:
[Reply to this message]
|