Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我这样做时,print_r我得到了这个数组:
print_r
Array ( [0] => Array ( [id] => 5280 ) )
如何使用 PHP 访问 id 值?
你可以像这样访问它
$id_value = $your_array[0]['id'];
尝试
$mapped = array_map("current",$array); echo $mapped[0];
如果根数组上有多个数组,这很有用, 例如:Array(Array(),Array()..)
Array(Array(),Array()..)