0
我的代码:存储数组值
$videos_key = array();
foreach($result[$x]["videos_key"] as $videoskey => $result[$x]["videos_key"])
{
$videos_key[$videoskey] = $result[$x]["videos_key"];
}
print_r($videos_key);
我想里面$result[$x]["videos_key"]
所有的值存储$videos_key
可变
但我得到这个错误:
Warning: Invalid argument supplied for foreach()
'$ result [$ x] [“videos_key”]':它是一个数组吗? –
您应该首先看看PHP的文档:[foreach](http://php.net/manual/en/control-structures.foreach.php) –
'$ result [$ x] [“videos_key”]'什么是'$ x',并且这是一个数组 – ArtisticPhoenix