Page 1 of 1

error getting on my nerves :>

Posted: Fri Mar 18, 2005 2:51 am
by scudz
[18-Mar-2005 08:41:17] PHP Warning: Wrong datatype for second argument in call to in_array in /home/webs/live/*/manager/listPage.php on line 92

Code: Select all

while($data = mysql_fetch_object($q)) {
		if(((in_array($data->id,$sections)) && $sul < 2) || $sul < 1 ) {

//$data->id is an int from the database
//$sections is an array of ids
//$sectionsї] = $wA->secSectionID; //where secSectionID is the id from the sections table.
Any help would be great as i get taht error 5 times (or however many sections i have) when running the scipt... altho it does still work, and echo the results i want.


feyd | Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url]. Please review the syntax for line number offsets as well.[/color]

Posted: Fri Mar 18, 2005 2:59 am
by anjanesh
Whats the output when you do print_r($sections) ?

Posted: Fri Mar 18, 2005 3:33 am
by scudz
Array ( [0] => 15 [1] => 22 [2] => 23 [3] => 36 [4] => 61 [5] => 77 )