Thank you, Ray.
I'm using Microsoft SQL server and not MySQL. Example below.
$sql1 = "SELECT * from table'";
$stmt1= sqlsrv_query($conn,$sql1);
if($stmt1 === false){
die (print_r(sqlsrv_errors(), true));
}
$row1 = sqlsrv_fetch_Array($stmt1,SQLSRV_FETCH_ASSOC);