Parse Error --- can not solve at this time... please assit

From: Date: Mon, 11 Oct 2004 05:48:18 +0000
Subject: Parse Error --- can not solve at this time... please assit
Groups: php.general 
Request: Send a blank email to php-general+get-199147@lists.php.net to get a copy of this message
With the following code, I am getting the following message.... Parse error: parse error, expecting `')'' in /var/www/html/cert/admin_template.php on line 30 Line 30 Reads as follows: foreach($admin_get_options_result as $api => $file, $desc) Can any one please assist. ***************ENTIRE CODE STARTING AT LINE 1 FOLLOWS ************* <html> <head> <title>ADMINISTRATION SCREEN</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?PHP require 'mod/db_access.php'; echo 'this is a test of the system'; if(!isset($_GET['api']) || (isset($_GET['api']) && ((strlen(trim(urldecode($_GET['api']))) == 0) || (!is_int($_GET['api']))))) $_GET['api']=0; if($_GET['api'] == 0) { $admin_get_options_query_text = "Select * from Adminpage"; $admin_get_options_results_reference = mysql_query($admin_get_options_query_text,$db_access) or die("Admin Get Options: ". mysql_error()); $admin_get_options_result = mysql_fetch_assoc($admin_get_options_result_reference); if(mysql_num_rows($admin_get_options_results_reference)>0) { ?> <table width="600"> <TR> <TD> Link </TD> <TD> DESCRIPTION </TD></TR> <?PHP foreach($admin_get_options_result as $api => $file, $desc) { echo '<TR> <TD>'; echo '<a href="#?api'.urlencoded($api).'"> Click Here </a> </td>'; echo '<TD>'.$desc.'</TD></TR>'; } ?> </table> <?PHP } } else { $admin_get_page_query_text = "Select * from Adminpage Where adminpageid = $_GET['api'] LIMIT 1"; $admin_get_page_results_reference = mysql_query($admin_get_page_query_text,$db_access) or die("Admin Get Page: ". mysql_error()); $admin_get_page_result = mysql_fetch_row($admin_get_page_result_reference); if (mysql_num_rows($admin_get_page_results_reference) > 0) { require "mod/admin/".trim(strtolower($admin_get_page_result[1])); } else { echo "ERROR: Invalid Admin Page Requested <br>"; echo 'Please Try Again ... <a href="admin_template.php?api=0"> Click Here </a>'; } } ?> </body> </html>

« previous php.general (#199147) next »