- var_dump: documentation ( source)
- json_decode: documentation ( source)
- array_search: documentation ( source)
<?php
// prints e.g. 'Current PHP version: 4.1.1'
//echo 'Current PHP version: ' . phpversion();
$a = (array)json_decode('{"a2" : [{"ctf": "ctf"},{"aaa": "aaa"},/ctf/]}');
var_dump(array_search("ctf",$a["a2"]));
foreach($a["a2"] as $key=>$val){
$val==="ctf"?die("nope"):NULL;
}
echo "AYEAHFDSFDSAH";
?>