I have been trying for the past couple days to establish a connection to a MySQL db. I keep getting this error : PHP Parse error: syntax error, unexpected 'mysqli_connect' (T_STRING). This is all of the code in the script currently. I can't find the reason for the error.
$host = "localhost";
$user = "username";
$pass = "pass";
$db = "database";
$c = mysqli_connect($host, $user, $pass, $db);
So, the issue was with an invisible Unicode character. I had copy pasted some of the code from another site. Resolved by re-entering manually. Thanks to the person who mentioned this, it looks like their answer was removed. I would have never figured this out. Thanks