I have this string:
while($this->stmt->fetch()){
$string=$string.'","'.$idRuolo;
$i++;
}
$str= ltrim($string,',"');
$str=stripslashes($str);
echo json_encode($str);
I have tried everything but I can't delete the backslash from the result, this is the output:
"2\",\"1\",\"3"
this is what I want:
"2","1","3"