You are here: How to replace an item in the url search string « PHP Programming Language « IT news, forums, messages
How to replace an item in the url search string

Posted by laredotornado on 11/02/14 11:41

Hi, Using PHP 4, what is the most elegant way to replace a parameter
value in a url query string? I want to replace the "Order" parameter,
but it could occur anywhere in the query string.

myfile.php?Param1=Hi+there&Order=ColumnA&Param3=Bye+Bye
myfile.php?Order=ColumnA
myfile.php?Param1=Anotehr+example&Order=ColumnA

after applying this function, I'd like the result of the above examples
to be

myfile.php?Param1=Hi+there&Order=ColumnB&Param3=Bye+Bye
myfile.php?Order=ColumnB
myfile.php?Param1=Anotehr+example&Order=ColumnB

Thanks for your help, - Dave

 

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

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