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

Reply via email to