search associative array by value

后端 未结 7 2075
感动是毒
感动是毒 2020-12-09 15:40

I\'m fetching some JSON from flickrs API. My problem is that the exif data is in different order depending on the camera. So I can\'t hard-code an array number to get, for i

7条回答
  •  隐瞒了意图╮
    2020-12-09 16:38

    foreach($exif['photo']['exif'] as $row) {
        foreach ($row as $k => $v) {
            if ($k == "label" AND $v == "Model")
                $needle[] = $row["raw"];
        }
    }
    print_r($needle);
    

提交回复
热议问题