<?php
function one($aa){
PHP uses "." as the connector, and the variable aa in your echo one(aa:'ccc'); is not declared, or define ('aa',111); defines a constant
Still reporting an error
<?php function one($aa){ return $aa; }; $array = array("aa" => "ccc"); print_r (one($array)['aa']); ?> 你试试这样 ,你传的参数有问题不能直接这样传,你要那样子的话只能转换成数组或对象,就像上面一样
PHP uses "." as the connector, and the variable aa in your echo one(aa:'ccc'); is not declared, or define ('aa',111); defines a constant
Still reporting an error