Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

PHP.....
#1

Anyone good with PHP here????

I have a prob. I'd like to air....

Code:
Invalid argument supplied for foreach() public_html/sources/Admin/admin_functions.php on line 742

Code:
$html .= "<form name='jumpmenu'>\n<select class='jmenu' name='val'>"; &nbsp; &nbsp;foreach($CATS as $cid => $name) &nbsp;{ &nbsp; $html .= "<optgroup label='$name'>\n"; &nbsp; &nbsp; foreach($PAGES[ $cid ] as $pid => $pdata) &nbsp; { &nbsp; &nbsp;$html .= "<option value='$pdata[1]'>$pdata[0]</option>\n"; &nbsp; } &nbsp; &nbsp; $html .= "</optgroup>\n";

Why do I keep this cesspool alive?
Reply
#2

There are two foreach loops in that snippet. Which one is on line 742? And what are the variables used in the foreach (e.g. what exactly is $CATS and $name if that's the bad foreach)?

Normally you get the invalid argument error when you're passing a non-array variable to foreach
Reply
#3

Yeah, leu, kick some programming ass!!

Just tryng to get my 10 posts.. damn name's pink!! Sucks!!

BTW, leu.. you play too many damn games!! Just saw your Champions just scrolling by!

SmileSmileSmileSmileSmileSmile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)