filtering string

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
getmizanur
Forum Commoner
Posts: 71
Joined: Sun Sep 06, 2009 12:28 pm

filtering string

Post by getmizanur »

From MSSQL i'm getting the following string for an output

Code: Select all

 
Alaska+%26+the+Rockies
 
I want to filter the above string to "Alaska the Rockies"

Can someone help.

Cheers
User avatar
flying_circus
Forum Regular
Posts: 732
Joined: Wed Mar 05, 2008 10:23 pm
Location: Sunriver, OR

Re: filtering string

Post by flying_circus »

It appears to have been url encoded

Code: Select all

<?php
  print urldecode('Alaska+%26+the+Rockies'); // Outputs: "Alaska & the Rockies"
?>
Post Reply