<?php
function one($aa){
三叶草2019-05-11 20:16:56
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
何子健2019-05-10 15:42:28
<?php function one($aa){ return $aa; }; $array = array("aa" => "ccc"); print_r (one($array)['aa']); ?> 你试试这样 ,你传的参数有问题不能直接这样传,你要那样子的话只能转换成数组或对象,就像上面一样