私はこの多次元連想配列を持っています:
$store = array(
array("id" => 13,"store_id" => 4,"name" => "trumpet","type" => "trumpet567"),
array("id" => 15,"store_id" => 3,"name" => "piano","type" => "piano689"),
array("id" => 33,"store_id" => 1,"name" => "flute","type" => "flute267"),
array("id" => 77,"store_id" => 3,"name" => "violin","type" => "violin324"),
array("id" => 78,"store_id" => 2,"name" => "guitar","type" => "guitar364"),
array("id" => 91,"store_id" => 3,"name" => "accordion","type" => "accordion763"));
および変数:
$instrument="guitar";
$instrument の store_id を取得する必要があります。いろいろ試しましたが解決に至りませんでした:(