2017-06-28 4 views

答えて

0

あなたのような関数を呼び出すたび:function test($arg = array('name','position'))あなたが持っている何

test(array('name'=>'username', 'position'=>'director')); 

そこには、デフォルトのparam値です。

あなたがここでそれについての詳細を読むことができます:http://php.net/manual/ro/functions.arguments.php

0

は、配列とそれを呼び出します。

$name = "Fred"; 
$position = "President"; 
test(array('name' => $name, 'position' => $position)); 
関連する問題