PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Jul 20, 2018 11:13 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Sep 15, 2017 7:24 am 
Offline
Forum Contributor

Joined: Thu Aug 16, 2007 12:54 am
Posts: 251
Hello All,
While working with some data I get characters like \x2F,\x26 etc

http:\x2F\x2Fstocks.us.reuters.com\x2Fstocks\x2Fratios.asp?rpc=66\x26symbol

Could you please suggest how can I convert these characters to regular format like
\x2F to /
\x26 to &

Regards,
Krishna Khanna


Top
 Profile  
 
PostPosted: Sat Sep 16, 2017 1:08 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13570
Location: New York, NY, US
To replace them in strings, use functions like iconv() or htmlentities(), or manually with str_replace() or preg_replace(). Many frameworks have a class that does this, you could use one of those.

_________________
(#10850)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group