Re: array_change_key_case() warning...

From: Date: Thu, 07 Nov 2002 23:58:44 +0000
Subject: Re: array_change_key_case() warning...
Groups: php.general 
Request: Send a blank email to php-general+get-123283@lists.php.net to get a copy of this message
Now it's working well. I was making a mistake with the while's loop. I saw my mistake using the print_r function. Thanks, RB
From: Maxim Maletsky <maxim@maxim.cx> To: "R B" <rbphp@hotmail.com> CC: maxim@php.net, php-general@lists.php.net Subject: Re: [PHP] array_change_key_case() warning... Date: Fri, 08 Nov 2002 00:01:41 +0100 What does $result = mysql_fetch_array($this->stmt,MYSQL_BOTH); print_r($result); give you? --- Maxim Maletsky maxim@php.net www.PHPBeginner.com // PHP for Beginners
www.maxim.cx         // my Home
// my Wish List:     ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 On Thu, 07 Nov 2002 21:50:03 +0000 "R B" <rbphp@hotmail.com> wrote: 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
_________________________________________________________________ MSN. Más Útil Cada Día http://www.msn.es/intmap/

« previous php.general (#123283) next »