
PHP ==> help?
Hi i have this weird php code and im gettin an error anybody knows how to fix it?
$var = “$”. $row2['id'];
$$var= $_POST['$row['id']‘];
error is on the second line
Parse error: parse error, unexpected T_STRING, expecting ‘]’
what is the error you are getting? Also, do you have any sample data for $row2['id']?
the problem is the single quotes in $_POST['$row['id']‘]
it should be $_POST[$row['id']].
the single quotes were breaking and the parser was seeing:
$_POST['$row[' id ']‘]
you may still run into other issues, I’m not sure what having the $ alone in the quotes for that first line will do.
Add Groups To Site