This isn't valid syntax:
PHP Code:
$GLOBALS['text']=array (
while( $row = sqlsrv_fetch_array( $stmt1, SQLSRV_FETCH_ASSOC) ) {
$term=$row["term"];
$native_term=$row["native_term"];
$term => $native_term,
}
);
You need to capture each of these in an array and merge it into the globals. You should also avoid using globals completely as well. There is no need to actually pull $row apart at all, its already an associative array. That can be added or merged to any other existing array. The problem you'll have is that only the last entry provided will win as it will otherwise overwrite. So you need to choose if $text will be a single dimension associative array, or if it will be a multi dimension array.