#40798 [Opn]: Array of mysql_result items not recognized as such
| From: | mailme at granville dot nl | Date: | Wed, 14 Mar 2007 01:14:31 +0000 |
| Subject: | #40798 [Opn]: Array of mysql_result items not recognized as such | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-110321@lists.php.net to get a copy of this message | ||
ID: 40798
User updated by: mailme at granville dot nl
Reported By: mailme at granville dot nl
Status: Open
Bug Type: MySQL related
Operating System: WINDOWS XP
PHP Version: 5.2.1
New Comment:
I ACTUALLY ENTERED A SMALL ERROR IN MY SUBMISSION:
Afterwards I want to seek in the array using: if (in_array($needle,
$array)) but I get an error "Warning: in_array()
[function.in-array]: Wrong datatype for second argument".
Previous Comments:
------------------------------------------------------------------------
[2007-03-14 01:09:57] mailme at granville dot nl
Description:
------------
SITUATION:
I build an array using $array[] = mysql_result($resource, $record,
$column);.
Afterwards I want to seek in the array using if
(in_array($needle,array)) but I get an error "Warning: in_array()
[function.in-array]: Wrong datatype for second argument". If one line
higher I test using is_array() I will get true and using print_r() also
gives me the array contents.
If I add an extra item to the array using $array[] = 'string'. The
error is not given
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40798&edit=1