79270402

Date: 2024-12-11 03:31:59
Score: 0.5
Natty:
Report link

I understood the request/question as to just literally remove the slashes '\' on the $jsonString.

You may do so with str_replace().

$test = '{\"acc\":\"0\",\"alarm\":\"02\",\"batl\":\"6\"...........}';
$removed = str_replace('\\', '', $test);

Checking the result

var_dump($removed);
string(46) "{"acc":"0","alarm":"02","batl":"6"...........}" // the output

The output is still a string.

Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (0.5):
Posted by: lemon8de