Re: Array_Walk error messages

From: Date: Sun, 07 Nov 2004 23:54:29 +0000
Subject: Re: Array_Walk error messages
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-201460@lists.php.net to get a copy of this message
* Thus wrote Stuart Felenstein: > Can anyone give me a clue what I have done wrong here. > > //These would be passed as ints: > array_walk($l_industry, 'mysql_escape_string'); > Warning: Wrong parameter count for > mysql_escape_string() in > /xxx/xxxx/public_html/Test2.php on line 104 > The callback function form array_walk expects to parameters: callback($key, $value); But mysql_escape_string() only takes one. As suggested earlier, use array_map() instead. Curt -- Quoth the Raven, "Nevermore."

« previous php.general (#201460) next »