FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


php need help:how to replace these strings ?





spring567
There are strings content: abc_1.asp abc_2.asp abc_3.asp abc_4.asp ...
I want to replace these strings as : new.php?id=1 new.php?id=2 new.php?id=3 new.php?id=4 ...

How can I do that ?
rvec
http://nl.php.net/manual/en/function.preg-replace.php
take a look at that function.

'/abc_(\d+).asp/' would be the pattern
'new.php?id=${1}' would be the replacement
Related topics
Mysql And PHP HELP PLZ
PHP Toturail
mysql/php help please
Reducing Exploits
Cash Mod Script Need Help!
please help me, i don't know anything here...
Need some php help.
How to start using PHP? Help!
PHP Help
php HELP!!!
PHP Help Forum
Need PHP mail() help
PHP Help please
PHP Help entering values from a text form into a table
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.