Jump to content

Array Help


Petsmacker

Recommended Posts

[code] <?
$box1=mysql_result($b,0,"box1");
$box2=mysql_result($b,0,"box2");
$os = compact('box1', 'box2')?>

<table width=60%><tr><td bgcolor=#00FFFF><center><b><? if (in_array("0.01", $os)){echo "0.01 Galleons";}?></b></center></td><td><center><img src="images/dond/divide.gif"></center></td>[/code]

This is a very simplified version of the code but basically it keeps showing me:

[b]Warning: in_array(): Wrong datatype for second argument in /home/xxx/public_html/dond.php on line 21[/b] in the in_array() function. Can anybody help?

And YES, the mysql_result IS picking up the database data correctly.
Link to comment
https://forums.phpfreaks.com/topic/5286-array-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.