You are here: eregi_replace confusion « All PHP « IT news, forums, messages
eregi_replace confusion

Posted by Mad Hatter on 09/28/12 11:49

I'm trying to replace characters in a string but getting totally confused.
I want to strip \r off the end of a string. Example, sometext\r and I want
to remove the \r
I've tried the following variations plus a few others :-

$testname=eregi_replace('\r',"",$testname);
$testname=eregi_replace('\\r',"",$testname);
$testname=eregi_replace('[\r]',"",$testname);

Nothing works as I want it. All I want is to remove all \r (and all \r but
once I get one woriing I should be able to get the other) off an inputed
string.

The php.net web site has confused me even more.Help?

 

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

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