Please tell me where is the error? As long as I run it in the browser, I get an error.
钱难有
钱难有 2019-05-10 14:36:01
0
3
986

<?php

function one($aa){


## return $aa;

}

echo one(aa:'ccc');

?>

As long as it is run in the browser, an error will be reported

钱难有
钱难有

reply all(3)
小猴子

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']);
 ?>
 你试试这样 ,你传的参数有问题不能直接这样传,你要那样子的话只能转换成数组或对象,就像上面一样


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template