My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How to particular extract value from json_encode() in php?

Default profile photo
Anonymous
·Feb 14, 2020

Hello All,

How I can get specific data from json_encode() ?

PHP Code : while ($run = mysqli_fetch_array($row)) { $result[] = $run; } $vasv = json_encode($result); echo $vasv;

Output : [ { 0: "15", 1: "0", id: "15", assign_sales_id: "0", assign_tele_id: "7", name: "ABC", }, { 0: "14", 1: "0", id: "14", assign_sales_id: "1", assign_tele_id: "8", name: "ABCD", }, { 0: "13", 1: "0", id: "13", assign_sales_id: "50", assign_tele_id: "45", name: "AWBC", }, { 0: "12", 1: "0", id: "12", assign_sales_id: "12", assign_tele_id: "18", name: "ADBCD", }, ]

I want 0th Key:14 value,0th Key:13 value,0th Key:12 value,0th Key:11 value

Image : json_array.png