SpiderPhp

Just another WordPress weblog

Use Php To Replace Characters In A String?

Posted Monday, July 6th, 2009
Tags: , ,
Posted in Uncategorized | 3 Comments »

I need to create a form for a website that asks for your address, city, state, and zip code, and when you click submit it will redirect you to a mapquest page that has already loaded directions from your address to a local business. Mapquest requires that there be no spaces, just plus signs. How can I write a script in PHP to replace something like “1234 Example Street” to “1234+Example+Street”?