Re: array_change_key_case() warning...
| From: | R B | Date: | Thu, 07 Nov 2002 21:50:03 +0000 |
| Subject: | Re: array_change_key_case() warning... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-123251@lists.php.net to get a copy of this message | ||
I'm making this:
$result = mysql_fetch_array($this->stmt,MYSQL_BOTH);
$result = array_change_key_case($result,CASE_UPPER);
So the $result array is returned from a mysql function.
I tried to put only MYSQL_ASSOC keys, but i get the same warning.
I want to put all the keys in uppercase because i make an application with oracle and i need to migrate to MYSQL, and oracle return the keys in uppercase, then i don't want to replace all the keys of my application.
The last solution is to put the @, but i want to know where is the problem.
Thanks,
RB.
From: Maxim Maletsky <maxim@php.net> Reply-To: maxim@php.net To: "R B" <rbphp@hotmail.com> CC: php-general@lists.php.net Subject: Re: [PHP] array_change_key_case() warning... Date: Thu, 07 Nov 2002 20:02:31 +0100 Are you sure you don't have something different from strings and integers in one of your keys? Anyway, you can still quiet the error up by prepeding the function with an at-mark: $myArray = @array_change_key_case($result,CASE_UPPER); -- Maxim Maletsky maxim@php.net "R B" <rbphp@hotmail.com> wrote... : Hello, I'm using array_change_key_case to return an array with all string keys uppercased. ex: $myArray = array_change_key_case($result,CASE_UPPER); If i have the display_errors = on and error_reporting = E_ALL in my php.ini then i get the warning: "Warning: Wrong datatype in array_change_key_case() call in....." How can i fix this warning? Thanks, RB _________________________________________________________________ MSN Fotos: la forma más fácil de compartir e imprimir fotos. http://photos.msn.es/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php_________________________________________________________________ Únete al mayor servicio mundial de correo electrónico: http://www.hotmail.com