//Create Connection
$conn = sqlsrv_connect($dbServer, $connectionInfo);
$query = "SELECT * FROM [table]";
$stmt = sqlsrv_query($conn, $query);
Note: the use of square brackets []
is to escape the word table
as it is a reserved word. These work in the same way as backticks `
do in MySQL.