I have a question. How to get content only from json data.
My JSON Data:
array(
(int) 0 => '{"html":"Lorem Ipsum \u2013 Lorem Ipsum \u2013 Lorem Ipsum - Lorem Ipsum \u2013 Lorem Ipsum \u2013 Lorem Ipsum \u2013 Lorem Ipsum"}',
(int) 1 => '{"text":"Lorem Ipsum"}',
(int) 2 => '{"text":"01 June-30 September"}',
(int) 3 => '{"text":"7 nights \/ 8 days"}',
(int) 4 => '{"text":"Lorem Ipsum"}'
);
I want to get html and text content only
Lorem Ipsum
Lorem Ipsum
01 June-30 September
I tried to use json_decode
.
My Code:
foreach($array as $i) {
$a = json_decode($i);
echo $a;
}
Anyone help me please?