php is_array数组 Notice: Array to string conversion

作者:袖梨 2022-06-24

例子

$str = preg_match_all('/(

  • ).*?(<\/UL>)/is', $str,$array);

if(is_array($$arrayList[0]) )
{
}

结果发现

Notice: Array to string conversion in E:\get_data.php on line 45

Notice: Undefined variable: Array in E:\get_data.php on line 45

仔细检查一下发现

is_array($$arrayList[0]多了一个美元了,如果说是RMB就好了

我们修改一下

if(is_array($arrayList[0]) )
{
}

执行就没有问题了哦。

相关文章

精彩推荐