使用php从数组中获取值

My echo output is below - NOTE: This comes from a Joomla module echo statement - Output of a repeatable field.

$params->get('star_slides');

{"Field1":["/demo/slide1.jpg","/demo/slide2.jpg"],"Field2":["Content 1","Content 2"],"Field 3":["Content 3","Content 4"]}

My goal is to extract the individual values of the fields

Set 1 - Values of the first field set.

/demo/slide1.jpg 
Content 1 
Content 3

How can I do this using php?

You have to parse JSON string to object or array, then you can access it's values. Like this:

<?php
$json = '{"Field1":["/demo/slide1.jpg","/demo/slide2.jpg"],"Field2":["Content 1","Content 2"],"Field 3":["Content 3","Content 4"]}';
$parsed = json_decode($json, true);
echo $parsed['Field1'][0];
echo "
";
echo $parsed['Field2'][0];
echo "
";
echo $parsed['Field 3'][0];
echo "
";
?>

It outputs:

/demo/slide1.jpg
Content 1
Content 3

Link to demo on Codepad.