I need to develop a php code to create a double level array. When I run the file this error appears:
Parse error: syntax error, unexpected ';' in C:\inetpub\wwwroot\file.php on line 20
I think that my error is a typo or some sentence bad closing but I can't find it.
<?php
$serverName = "serverName\SQLEXPRESS";
$connectionInfo = array( "Database"=>"dbName", "UID"=>"user", "PWD"=>"pass");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false ) {
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT * FROM table1";
$stmt = sqlsrv_query( $conn, $sql);
if ($stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
$bbs = array();
while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_NUMERIC){
$bbs = array_merge($bbs, array_values($row));
}
print_r($bbs);
?>