{"id":1896,"date":"2018-10-26T21:39:30","date_gmt":"2018-10-26T21:39:30","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=1896"},"modified":"2022-02-17T07:14:01","modified_gmt":"2022-02-17T07:14:01","slug":"special-characters-in-strings","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/php\/strings\/special-characters-in-strings","title":{"rendered":"Special Characters In Strings"},"content":{"rendered":"<h4>\nConvert backslashed strings<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n $MyString = &quot;a\\&quot;b&quot;;\r\n echo $MyString;\t\t\t\t\t\t\t\t\t\/\/Will output: a\\&quot;b\r\n echo stripcslashes($MyString);\t\t\/\/Will output: a&quot;b\r\n<\/code><\/pre>\n<p>\nIf&nbsp;stripcslashes() doesn&#39;t work try using it at the point of outputting the string to the browser, at the echo call.&nbsp; Using it to convert a string and store in a string won&#39;t necessarily work!\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Convert backslashed strings $MyString = &quot;a\\&quot;b&quot;; echo $MyString; \/\/Will output: a\\&quot;b echo stripcslashes($MyString); \/\/Will output: a&quot;b If&nbsp;stripcslashes() doesn&#39;t work try using it at the point of outputting the string to the browser, at the echo call.&nbsp; Using it to convert a string and store in a string won&#39;t necessarily work! &nbsp;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-1896","post","type-post","status-publish","format-standard","hentry","category-strings"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=1896"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1896\/revisions"}],"predecessor-version":[{"id":1898,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1896\/revisions\/1898"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=1896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=1896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=1896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}