ghurty Posted January 23, 2011 Share Posted January 23, 2011 In the following code, I am getting an error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING or T_VARIABLE or '{' or '$' in XXX on line 235 Line 235 is the second line in the code snippet $result = mysql_query( $querystr, $this->linkid ); $this->"queryid".$id = $result; if ( defined( "SWIFTDEBUG" ) ) { Thanks Quote Link to comment https://forums.phpfreaks.com/topic/225429-getting-parser-error-regarding-the-syntax/ Share on other sites More sharing options...
bbram Posted January 23, 2011 Share Posted January 23, 2011 I know this probably not it...but you are missing closing ) on the if statement. Quote Link to comment https://forums.phpfreaks.com/topic/225429-getting-parser-error-regarding-the-syntax/#findComment-1164107 Share on other sites More sharing options...
ghurty Posted January 23, 2011 Author Share Posted January 23, 2011 Sorry, cut off a little when copying/pasting. Fixed it now Quote Link to comment https://forums.phpfreaks.com/topic/225429-getting-parser-error-regarding-the-syntax/#findComment-1164108 Share on other sites More sharing options...
DavidAM Posted January 24, 2011 Share Posted January 24, 2011 I don't think this is valid syntax: $this->"queryid".$id = $result; you would have to build the dynamic property name first: $qID ="queryid".$id; $this->$qID = $result; Quote Link to comment https://forums.phpfreaks.com/topic/225429-getting-parser-error-regarding-the-syntax/#findComment-1164266 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.