Graveyard666 Posted February 10, 2004 Share Posted February 10, 2004 After following the Wiki doc, I get this error: Parse error: parse error, expecting `')'' in /home/graveyar/public_html/catalog/includes/functions/html_output.php on line 277 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/graveyar/public_html/catalog/includes/functions/html_output.php:277) in /home/graveyar/public_html/catalog/includes/functions/sessions.php on line 67 www.graveyardrecords.com/catalog my line says: for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array = array(array('id' => '223', 'text' => 'United States')); } I just copy/pasted what Wiki put in their doc any idea hwo to fix this? jeff Link to comment Share on other sites More sharing options...
Guest Posted February 10, 2004 Share Posted February 10, 2004 99% of the time, a headers already sent is an extra line or white space after the last >? in your file (in this case html_output.php) The_Bear Link to comment Share on other sites More sharing options...
Graveyard666 Posted February 10, 2004 Author Share Posted February 10, 2004 I checked the file and backspaced from the 1 empty line but I still receive this error Link to comment Share on other sites More sharing options...
Guest Posted February 10, 2004 Share Posted February 10, 2004 my line says: for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array = array(array('id' => '223', 'text' => 'United States')); } You changed the wrong line that begins with $countries_array (you do not change the one in the loop!)...the entire function should look like this: function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '223', 'text' => 'United States')); $countries = tep_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } HTH Link to comment Share on other sites More sharing options...
Graveyard666 Posted February 10, 2004 Author Share Posted February 10, 2004 that code still didn't work.. I re-uploaded the original with no changes and the error messages are gone.. here is what I have, what needs to be changed? // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries = tep_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } ?> can you put it where I can just copy/paste so I don't type something wrong. do any other files need to be modified to make this work? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.