I have this string
$search_data = '{"Search Engine":"High Schools","Population":300,"Avg GPA":"3.2","Graduation Rate":"98%"}';
$data = explode(",", $search_data);
$display_data = "<br/>";
foreach($data as $item){
$display_data .= "<span>$item</span><br/>";
}
echo $display_data;
What is echoed looks like this:
{"Search Engine":"High Schools"
"Population":300
"Avg GPA:"3.2"
"Graduation Rate":"98%"}
How can i properly format this so the displayed text looks like this:
Search Engine: High Schools
Population : 300
Avg GPA: 3.2
Graduation Rate: 98%
Any helpful tips will be appreciated - Thanks!