Error Expecting T_string Or T_variable
Contents |
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 parse error: syntax error, unexpected '(', expecting variable (t_variable) or '$' Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation syntax error unexpected expecting & or variable t_variable Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like t_constant_encapsed_string you, helping each other. Join them; it only takes a minute: Sign up Parse error: expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in ..? [closed] up vote 0 down vote favorite I tried to put an if statement
Php Function
inside an echo but this parse error came up, is it not possible to do that? should I use heredoc instead? echo " />Yes />No"; php radio-button syntax-error share|improve this question edited Apr 29 '10 at 20:26 500 - Internal Server Error 21.6k63551 asked Apr 29 '10 at 20:22 user306440 3129 closed as too localized by rdlowrey, Jasper, cryptic ツ, Till Helge, Jocelyn Mar 8 '13 at 17:31 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 3 Answers 3 active oldest votes up vote 2 down vote accepted You can't put inside an echo statement. You need to either set a variable outside and include it like echo "
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 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Parse error: syntax http://stackoverflow.com/questions/2740529/parse-error-expecting-t-string-or-t-variable-or-t-num-string-in error, unexpected (T_STRING), expecting variable (T_VARIABLE) [closed] up vote -1 down vote favorite I will be grateful if someone can point out where the error is occurring. class hotel extends WishDBxyz{ public nomhotel; protected idhotel, ile_idile, pays_idpays, chainehotel_idchainehotel, actif ; } Just on second line got the error Parse error: syntax error, unexpected (T_STRING), expecting variable (T_VARIABLE). I'm quite new to Object Oriented PHP and http://stackoverflow.com/questions/21930748/parse-error-syntax-error-unexpected-t-string-expecting-variable-t-variable writting one class inheriting another class. php class oop inheritance share|improve this question asked Feb 21 '14 at 9:48 Pax 1112 closed as off-topic by Shankar Damodaran, Rikesh, CBroe, kumar_v, andrewsi Feb 22 '14 at 0:35 This question appears to be off-topic. The users who voted to close gave this specific reason:"This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Shankar Damodaran, Rikesh, CBroe, kumar_v, andrewsiIf this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 5 Answers 5 active oldest votes up vote 4 down vote Those are variables in php.So add the $ sign: class hotel extends WishDBxyz{ public $nomhotel; protected $idhotel, $ile_idile, $pays_idpays, $chainehotel_idchainehotel, $actif ; } share|improve this answer answered Feb 21 '14 at 9:50 Codrutz Codrutz 327412 add a comment| up vote 1 down vote you are missing
Detected https://forums.phpfreaks.com/topic/165152-solved-parse-error-expecting-t-string-or-t-variable-or-t-num-string/ You currently have javascript disabled. Several functions may not work. Please re-enable javascript to access full functionality. [SOLVED] Parse Error https://www.daniweb.com/programming/web-development/threads/277600/parse-error-parse-error-expecting-t-string-or-t-variable-or-t-num-string - expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' Started by twilitegxa, Jul 08 2009 07:05 AM Please log in to reply syntax error 2 replies to this topic #1 twilitegxa twilitegxa Advanced Member Members 1,020 posts LocationKnoxville, Tennessee Posted 08 July 2009 - 07:05 AM Can anyone help figure out what I am missing? Here is the error being produced upon opening the page: error expecting t_string Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in C:\wamp\www\addentry.php on line 62 And here is the code: Add An Entry