Parse Error Syntax Error Unexpected T_while Expecting T_function
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 syntax error unexpected 'return' (t_return) laravel about Stack Overflow the company Business Learn more about hiring developers or posting ads parse error syntax error unexpected return t_return in with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack syntax error unexpected while t_while Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up how to solve? Parse error: syntax error, unexpected 'while' (T_WHILE), expecting function (T_FUNCTION) in [duplicate] up vote -4 down vote favorite This question already has an answer here: PHP Parse/Syntax Errors; and How to solve them? 10 answers I'm getting an error from my code. What is causing this, and how can I solve it? The code:
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 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 Parse error: syntax error, unexpected 'while' (T_WHILE) up vote -1 down vote favorite I can't http://stackoverflow.com/questions/36266441/how-to-solve-parse-error-syntax-error-unexpected-while-t-while-expecting fix this error: Parse error: syntax error, unexpected 'while' (T_WHILE) in /xyz/xyz.php on line 76 I'm using php 5.4.4 Anyone could help? The xyz.php 74-96 Lines: if (( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc( ) )) { $process = array( &$_GET, &$_POST, &$_COOKIE, &$_REQUEST ); $val = while (list($key, $val) = each($process)) {; [0]; $key = ; if () { foreach ($val as $k => $v) { unset( $process[$key][$k] ); if (is_array( http://stackoverflow.com/questions/20616570/parse-error-syntax-error-unexpected-while-t-while $v )) { $process[$key][stripslashes( $k )] = $v; $process[] = &$process[$key][stripslashes( $k )]; continue; } $process[$key][stripslashes( $k )] = stripslashes( $v ); } } unset( $$process ); } php parsing syntax do-while share|improve this question edited Apr 22 '14 at 13:32 Tshepang 4,7061059103 asked Dec 16 '13 at 17:09 user3108175 313 Your syntax for the while loop is odd - why are you trying to assign it to $val? What are [0]; and $key = ; trying to do? –andrewsi Dec 16 '13 at 17:11 3 Dafuq is this code? –Niet the Dark Absol Dec 16 '13 at 17:11 Many syntax errors. –Ricardo Alvaro Lohmann Dec 16 '13 at 17:13 add a comment| 1 Answer 1 active oldest votes up vote 6 down vote accepted while is a language construct, and is NOT something you can capture a return value from: $val = while ( ... ) { ... } ^^^^^^---invalid It should be just while (...) { ... } share|improve this answer answered Dec 16 '13 at 17:11 Marc B 274k24234352 +1 , Marc for simple explanation. –Shankar Damodaran Dec 16 '13 at 17:13 2 +1, but the bad while is just one of the many problems in the code... &ndash
of 1 New Topic/Question Reply 9 Replies - 8443 Views - Last Post: 23 August 2012 - 10:52 AM Rate Topic: #1 ersaan New D.I.C Head Reputation: 0 Posts: 47 Joined: http://www.dreamincode.net/forums/topic/289788-parse-error-syntax-error-unexpected-t-while/ 31-May 12 Parse error: syntax error, unexpected T_WHILE Posted 23 August 2012 - 06:16 AM I'm new to php and im trying to connect with Php to SQL- server and send some https://forum.opencart.com/viewtopic.php?f=20&t=158099 information from web to database but there is one problem appears to me T_WHILE i searched a lot web sites but i cannot find any solution . can u help me what syntax error can i do .. Attached File(s) index.html (408bytes) Number of downloads: 24 update.php (752bytes) Number of downloads: 12 Is This A Good Question/Topic? 0 Back to top MultiQuote Quote + Reply Replies To: Parse error: syntax error, unexpected T_WHILE #2 Slice sudo pacman -S moneyz Reputation: 253 Posts: 759 Joined: 24-November 08 Re: Parse error: syntax error, unexpected T_WHILE Posted 23 August 2012 - 06:18 AM Line 22, your query, needs a closing semi-colon ";". Was This Post Helpful? 2 Back to top MultiQuote Quote + Reply #3 Dormilich 痛覚残留 Reputation: 4051 Posts: 12,578 Joined: 08-June 10 Re: Parse error: syntax error, unexpected T_WHILE Posted 23 August 2012 - 06:19 AM the standard while loop does not end with a ; which in turn is missing on the previous line. PS. SQL NULL-values ain't quoted. This post has been edited by Dormilich: 23 August 2012 - 06:20 AM Was This Post Helpful? 3 Back to top Multi
Download Documentation Documentation Screencasts Support General Support Community Forums Bug Tracker Contact Us Extensions Partners Community Forums Board index Change font size Search FAQ Register Login Information The requested topic does not exist. Board index The team • Delete all board cookies • All times are UTC - 6 hours Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group Protected by Anti-Spam ACP Get Social Follow us on the social media web sites. Newsletter Subscribe to our newsletters and be informed of new releases and other OpenCart events. Subscribe here Contact Us OpenCart Limited, Unit 16, 26/F, Tuen Mun Central Square, 22 Hoi Wing Road, Tuen Mun, Hong Kong +852 24990996 Send email via our contact form Copyright © 2016 OpenCart - All rights reserved Hosted by A2 Hosting