Quick Table of Contents
[Edit] Parse Error: syntax error, unexpected $end
When you see the unexpected $end syntax error it is telling you that you left something open that should have closed(usually improper curly bracket or quote nesting). This error is many times difficult to pinpoint in your script because the error line that is returned is not going to be the line where the nest opens. The error line is usually where the program ends. Functions, loops, condition statements, as well as other mechanisms use curly brackets to open and close those mechanisms ( { } ). Strings will use quote marks for encapsulation and nesting. This error will also render when you use short opening PHP tags(<?) instead of the normal(<?php). To use short PHP tags you must configure your php.ini file to make them work. How can i fix it
$name = "Adam; // will render unexpected $end $name = "Adam'; // will render unexpected $end $name = "Adam"; // is correct quote mark nesting short_open_tag = On [Edit] Unexpected T_LNUMBER, expecting T_STRING
This notice usually renders when you begin the name of a function with a number. How can i fix itDo not use a number as the first character in the name of function, object, or variable. This function name below will render the error.function 2ndFunction() { echo "The number as first character in the name of the function will render this error."; } [Edit] Unexpected T_LNUMBER, expecting T_VARIABLE
This notice will render when you begin the name of a variable with a number. How can i fix itDo not use a number as the first character in the name of any variable, object, or function.$2var = "Hello"; // Wrong $var2 = "Hello"; // Right |
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
© Advanced Web Core. All rights reserved