subhra subhra - 1 year ago 72
PHP Question

How to check array value using in_array in PHP

i have an doubt. I want to check the new value is present in existing array which contains json data using PHP

method. I am explaining my code below.


Here i need to check
is present in the above array or not using PHP. Please help me.

Answer Source
$json = '{"introId":"582aa53755f5ab487614ddc9","introLabelName":"Age","isIntro":"Yes"}';
$array = json_decode($json, true);
echo in_array('582aa53755f5ab487614ddc9', $array);


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download