php get last slash from string code example
Example 1: php remove last character in string
//Remove the last character using substr
$string = substr($string, 0, -1);
Example 2: php remove slashes from json
echo stripslashes('{\"test\":{\"test1\":{\"test1\":[{\"test2\":\"1\",\"test3\": \"foo\",\"test4\":\"bar\",\"test5\":\"test7\"}]}}}');