Parse Error Syntax Error Unexpected T_lnumber Expecting T_string Or T_variable
Contents |
here for a quick overview of the site php t_lnumber 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 T_LNUMBER, expecting ')' [closed] up vote 0 down vote favorite I'm getting Parse error: syntax error, unexpected T_LNUMBER, expecting ')' This is the code I'm using: function getLevelByXp($xp) { $listlevel=array(0,40,60,100,200,350,550,800,1113,1504,1993,2604,3368,4323,5517,7010,8876,11209,13659,16232,18934,21771,24750,27878,31162,34610,38230,42031,46022,50213,54614,59235,64087,69182,74532,80150,86049,92243,98747,105576,112746,120275,128180,136480,145195,154346,163955,174044,184637,195760,207439,219702,232578,246098,260294,275200,290851,307285,324541,342660,361685,381661,402636,424660,447785,472066,497561,524331,552440,581954,612944,645484,679651,715526,756782,804226,858787,921532,993689,1076670,1172098,1281840,1408043,1553176,1720079,1912017,2132746,2386584,2678498,3014199,3400255,3844219,4354778,4941921,5617135,6393631,7286601,8313517,9494470,2016089205); $j=count($listlevel); for($i=0;$i<$j;$i++){ if($listlevel[$i] > $xp) break; } return $i; } This is the line where i'm getting that error $listlevel=array(0,40,60,100,200,350,550,800,1113,1504,1993,2604,3368,4323,5517,7010,8876,11209,13659,16232,18934,21771,24750,27878,31162,34610,38230,42031,46022,50213,54614,59235,64087,69182,74532,80150,86049,92243,98747,105576,112746,120275,128180,136480,145195,154346,163955,174044,184637,195760,207439,219702,232578,246098,260294,275200,290851,307285,324541,342660,361685,381661,402636,424660,447785,472066,497561,524331,552440,581954,612944,645484,679651,715526,756782,80422
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 T_LNUMBER, expecting T_STRING or T_VARIABLE or http://stackoverflow.com/questions/22183063/parse-error-syntax-error-unexpected-t-lnumber-expecting '{' or '$' in core\cake\basics.php on line 118 up vote -1 down vote favorite Parse error: syntax error, unexpected T_LNUMBER, expecting T_STRING or T_VARIABLE or '{' or '$' in core\cake\basics.php on line 118 ) please some one help me. } function pluginSplit($name, $dotAppend = false, $plugin = null) { if (strpos( $name, '.' ) !== false) { $parts = explode( '.', $name, 2 ); if ($dotAppend) { $parts->0 .= http://stackoverflow.com/questions/20821519/parse-error-syntax-error-unexpected-t-lnumber-expecting-t-string-or-t-variabl '.'; } return $parts; } php parsing syntax line share|improve this question edited Dec 29 '13 at 2:48 Elliott Frisch 112k1149103 asked Dec 29 '13 at 2:25 user3143093 11 And line 118 is? Btw, in what you show I don't see the final } of the function... –fvu Dec 29 '13 at 2:32 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote I assume that the error is occurring here: $parts->0 .= '.'; If you're trying to access the 0th element of the array, the proper syntax is $parts[0]. share|improve this answer answered Dec 29 '13 at 2:40 Ben 8181725 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged php parsing syntax line or ask your own question. asked 2 years ago viewed 2429 times active 2 years ago Related 0PHP Parse error… syntax error unexpected '(', expecting T_STRING or T_VARIA
please help about this error message Page 1 of 1 New Topic/Question Reply 8 Replies - 16248 Views - Last Post: 07 January 2009 - 12:43 PM Rate Topic: #1 Ghost rider D.I.C Head Reputation: -5 Posts: 158 Joined: 29-October 08 Parse error: syntax error, http://www.dreamincode.net/forums/topic/79413-parse-error-syntax-error-unexpected-t-lnumber/ unexpected T_LNUMBER Posted 05 January 2009 - 11:16 AM I'm trying to control the size of image using this line of code. echo "
"; when use this tag to control size of images height="150" width="234" it displaying this error message and line31 is that first line of code above. Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in C:\wamp\www\upload\images1.php on line 31. Is This A syntax error Good Question/Topic? 0 Back to top MultiQuote Quote + Reply Replies To: Parse error: syntax error, unexpected T_LNUMBER #2 Hary D.I.C Regular Reputation: 44 Posts: 427 Joined: 23-September 08 Re: Parse error: syntax error, unexpected T_LNUMBER Posted 05 January 2009 - 11:21 AM You forget to escape the " around the size thingies. You do escape the first one, escape the rest as well! This post has been edited by Hary: 05 January 2009 - 11:22 AM syntax error unexpected Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #3 sam_benne D.I.C Addict Reputation: 16 Posts: 732 Joined: 16-January 08 Re: Parse error: syntax error, unexpected T_LNUMBER Posted 05 January 2009 - 11:31 AM Try this it does the same echo "
"; Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #4 Ghost rider D.I.C Head Reputation: -5 Posts: 158 Joined: 29-October 08 Re: Parse error: syntax error, unexpected T_LNUMBER Posted 05 January 2009 - 11:46 AM Thank for your reply. I tried use escape in all position around size thingies but I still getting the same error. Please could you illustrate using code? Thanks in advance Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #5 JackOfAllTrades Saucy! Reputation: 6243 Posts: 24,012 Joined: 23-August 08 Re: Parse error: syntax error, unexpected T_LNUMBER Posted 05 January 2009 - 12:08 PM Show us the most recent thing you tried. Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #6 CTphpnwb D.I.C Lover Reputation: 3512 Posts: 12,593 Joined: 08-August 08 Re: Parse error: syntax error, unexpected T_LNUMBER Posted 05 January 2009 - 12:21 PM sam_benne, on 5 Jan, 2009 - 10:31 AM, said:Try this it does the same echo "
";