lördag, oktober 27, 2012

Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING

How to fix Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING in PHP 5.3:

I had a script suddenly giving the above PHP Parse error. The simple solution to make it work is to add something before NAMESPACE.
An example:


function namespace($str){
global $sql, $mod;

Just change is to this:

function something_namespace($str){
global $sql, $mod; 


0 kommentarer: