SarahB12 Posted May 14, 2010 Share Posted May 14, 2010 I am receiving a Parse Error, and I have narrowed it down the following line of code: <?php while ($row_settings = mysql_fetch_array($rs_settings)) {?> Any suggestions on what could be causing this? I have verified that all my query's are functioning properly. Thanks for your help! ~SarahB~ Quote Link to comment https://forums.phpfreaks.com/topic/201763-php-parse-error/ Share on other sites More sharing options...
Hybride Posted May 14, 2010 Share Posted May 14, 2010 You need a result type after the $rs_settings, which you have an option of 3: MYSQL_ASSOC, MYSQL_NUM, and MYSQL_BOTH. MySQL_fetch_array. <?php while ($row_settings = mysql_fetch_array($rs_settings,MYSQL_BOTH)) { //for example?> Quote Link to comment https://forums.phpfreaks.com/topic/201763-php-parse-error/#findComment-1058339 Share on other sites More sharing options...
PFMaBiSmAd Posted May 14, 2010 Share Posted May 14, 2010 The posted line of code does not produce a php parse error (unless you don't have a closing } later in the code.) If you really want someone if a forum to help with an error in your code, you need to post the error message with the line number information and you need to post enough of your code up to (syntax errors are often caused by something that the programmer left out prior to the line where the error is being reported at) and including the line where the error was reported at. Quote Link to comment https://forums.phpfreaks.com/topic/201763-php-parse-error/#findComment-1058346 Share on other sites More sharing options...
SarahB12 Posted May 14, 2010 Author Share Posted May 14, 2010 Thanks for your help guys! I had to change <? to <?php Quote Link to comment https://forums.phpfreaks.com/topic/201763-php-parse-error/#findComment-1058367 Share on other sites More sharing options...
kenrbnsn Posted May 14, 2010 Share Posted May 14, 2010 Changing "<?php" to "<?" should not be the solution. Ken Quote Link to comment https://forums.phpfreaks.com/topic/201763-php-parse-error/#findComment-1058373 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.