error getting on my nerves :>

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
scudz
Forum Newbie
Posts: 8
Joined: Tue Mar 08, 2005 4:27 am

error getting on my nerves :>

Post 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]
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Whats the output when you do print_r($sections) ?
scudz
Forum Newbie
Posts: 8
Joined: Tue Mar 08, 2005 4:27 am

Post by scudz »

Array ( [0] => 15 [1] => 22 [2] => 23 [3] => 36 [4] => 61 [5] => 77 )
Post Reply