Reply to Re: basic string replacement

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация