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 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. 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 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; 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
Archived
This topic is now archived and is closed to further replies.