You are here: Re: How do I replace a '_' with a space ? « PHP Programming Language « IT news, forums, messages
Re: How do I replace a '_' with a space ?

Posted by Oli Filth on 10/18/05 20:46

Oliver Saunders said the following on 18/10/2005 18:06:
>> $string = "United_Kingdom";
>> $string = str_replace ("_", " ", $string);
>
>
> couldn't you also use preg_replace()? would that be faster?

You could preg_replace(), but I would imagine it would be orders of
magnitude slower, because regex-based matching is far more complex than
simple sub-string matching.

--
Oli

 

Navigation:

[Reply to this 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

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