note 28627 added to ref.array

From: Date: Sat, 18 Jan 2003 12:24:10 +0000
Subject: note 28627 added to ref.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-42342@lists.php.net to get a copy of this message
I have a little problem, when I have this in my include document, and I call for the funcion with the $parm. Then it won't return a good array: Array ( [0] => "test ","test2","test3" But when I replace $parm with "test ","test2","test3" then it wil do it OK: Array ( [0] => test mango [1] => test2mango [2] => test3mango ) Here is my function? function($parm) { $av = array($parm); array_walk($av, create_function('&$v,$k','$v = $v."mango";')); print_r($av); // for PHP 3 use var_dump() // outputs: // Array // ( // [0] => the mango // [1] => a mango // [2] => that mango // [3] => this mango // ) } Can please someone help me? -- http://www.php.net/manual/en/ref.array.php http://master.php.net/manage/user-notes.php?action=edit+28627 http://master.php.net/manage/user-notes.php?action=delete+28627 http://master.php.net/manage/user-notes.php?action=reject+28627

« previous php.notes (#42342) next »