- json_decode: documentation ( source)
- str_replace: documentation ( source)
- htmlspecialchars: documentation ( source)
<?php
$jobs = "{'te st':'testing '}";
$jobs = str_replace(" ", " ", $jobs);
$jobs = json_decode($jobs,true);
echo htmlspecialchars($jobs);