Not Found
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community http://stackoverflow.com/questions/10922771/parse-error-syntax-error-unexpected-t-endwhile Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP: Why do I get syntax error, unexpected 'endwhile' (T_ENDWHILE)? [closed] up vote -1 down vote favorite PHP: Why do I get syntax error, unexpected 'endwhile' (T_ENDWHILE) http://stackoverflow.com/questions/14089549/php-why-do-i-get-syntax-error-unexpected-endwhile-t-endwhile on line 38? I'm trying to create a forum for the first time with php and mysql and I'm not sure what's wrong with my code. prepare($sql)){ $query->bind_result($f_id, $f_name); $query->execute(); $query->store_result(); }else{ echo $db->error; } ?>
in PHP Forum View Course 125 points Submitted by https://www.codecademy.com/en/forum_questions/52ba98287c82ca64f4003d93 Tyson Ho almost 3 years ago 4/7 Parse error: syntax error, unexpected T_ENDWHILE, expecting ',' or ';' Using Endwhile Here is my https://forums.phpfreaks.com/topic/290299-parse-error-syntax-error-unexpected-t-endwhile/ PHP code
it is 100 now.
"; ?> Why I will get "Parse error: syntax error, unexpected T_ENDWHILE, expecting ',' or ';' on line syntax error unexpected 13 " 1 vote permalink It's expecting a ';' after echo " $loopcount is too small,unless the value is 100" And right above that, I think you meant to write $loopcount = $loopcount + 10; 168 points Submitted by Dannie Scull almost 3 years ago 2 Comments Tyson Ho almost 3 years ago thanks for your help :) Dannie Scull almost 3 years ago You're Welcome :) 1 vote permalink change the value 100 to 90 and do the correction given by dannie scull A loop of your own 957 points Submitted by Amy Kei almost 2 years agoDetected You currently have javascript disabled. Several functions may not work. Please re-enable javascript to access full functionality. Parse error: syntax error, unexpected T_ENDWHILE Started by 757design, Aug 06 2014 06:14 AM parse error while loop php Please log in to reply 3 replies to this topic #1 757design 757design Newbie New Members 1 posts Posted 06 August 2014 - 06:14 AM can some one help me with this code I'm getting aParse error: syntax error, unexpected T_ENDWHILE error code on the last line of code. source code below
'$mytrails' )); ?> Edited by mac_gyver, 06 August 2014 - 03:51 PM. code tags please Back to top #2 PravinS PravinS Advanced Member Members 459 posts Posted 06 August 2014 - 06:18 AM you have only 1 while loop and 2 endwhile Edited by PravinS, 06 August 2014 - 06:19 AM. Thanks & Regards,PravinS| Blog Back to top #3 mogosselin mogosselin Advanced Member Members 118 posts LocationMontreal Posted 06 August 2014 - 09:28 AM 'unexpected T_ENDWHILE' really means 'Dude, I see an 'endwhile' and I didn't expect it at all... what the hell is that?'. Sometimes, those error messages means that you are missing a ';' character at the end of a line and then PHP sees the next 'statement' (which is not a ';') and will spit this error. But, like ParvinS said, in your case, you have two 'endwhile' and just one 'while loop'. PHP saw your last 'endwhile' and tought 'what the hell is that? I didn't see any 'while' and now you want to end it?'. My latest post:Debugging with Xdebug and Sublime Text 3 a VirtualBox PHP Server. Back to top #4 Jacques1 Jacques1 OrpheanBeholderScryDoubt Gurus 2,719 posts Posted 06 August 2014 - 09:52 AM You know how you can avoid those errors? Proper formatting. No offense, but this is a mess even for a Wordpress template. Indentation and visual structuring isn't just nice-to-have. It's a major part of writing correct code. If you you write a mess, then you first confuse other readers, then yourself and finally the parser. You've reached the last stage. paddy_fields likes this Back to top Back to PHP Coding Help · Next Unread Topic → 1 user(s) are readin