[Solved] Extracting data from Json in Php


I hope you are looking for this, its very simple example by using json_decode():

$string = '{"seat_booked":"A5","0":"A5","1":"A3"}';
$decoded = json_decode($string,true);
$resuiredString = '"'."'".implode("','", $decoded)."'".'"';

echo $resuiredString;

Result:

"'A5','A5','A3'"

Side Note:

I suggest you to learn about variable concatenation.

PHP Concatenation

2

solved Extracting data from Json in Php