-3

How to Convert Sql String Text to Plain Text Using Php Function Or Code.

Example:

Sql String Text:

http:\/\/wapindia.in\/Wapindia\/string\/index.php

Plain Text:

http://wapindia.in/Wapindia/string/index.php

  • Possible duplicate of [How can I check if one string contains another substring?](http://stackoverflow.com/questions/1789945/how-can-i-check-if-one-string-contains-another-substring) – Mr Robot Mar 16 '16 at 07:23
  • http://www.percederberg.net/tools/text_converter.html the site is giving me result but i want to fix it my site. – Rafik Khan Mar 16 '16 at 07:30
  • check the above similar question and replace your extra backslash – Mr Robot Mar 16 '16 at 07:32
  • i want to change the above string without any replacer function – Rafik Khan Mar 16 '16 at 07:35

1 Answers1

0
<?php

$result = '{
    "status": "http:\/\/wapindia.in\/Wapindia\/string\/index.php"
   }';
$data = json_decode($result,true);
echo $data[status];
?>

OutPut:

http://wapindia.in/Wapindia/string/index.php
  • 1
    While this code snippet may solve the question, [including an explanation](http://meta.stackexchange.com/questions/114762/explaining-entirely-code-based-answers) really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, this reduces the readability of both the code and the explanations! – Tobi Nary Mar 16 '16 at 09:40