Having a problem with this script
Posted: Wed Oct 04, 2006 9:00 am
feyd | Please use
Here's the code from line 125 on down:
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am building a link directory for myself to exchange links with everyone, and I downloaded the program, it successfully installed, and it's not working. Do you see what is wrong with the code?
Here's the error:Code: Select all
Warning: Invalid argument supplied for foreach() in /home/froshizz/public_html/directory/category.php on line 125Here's the code from line 125 on down:
Code: Select all
foreach ( $result as $val )
{
// don't build a directory if there is no sub directory for this category
if ( $val->sub_category == "" )
{
continue;
}
$sub_category = str_replace ( "_", " ", $val->sub_category );
show_category_row ( $category, $sub_category, $val->sub_category );
$count++;
if ( $count == $round )
{
echo "</table>\n";
echo "<td width=\"50\"> </td>\n";
echo "<td width=\"250\" valign=\"top\">\n";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
}
}
echo "</table>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<p>\n";feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]