problem with array

From: Date: Fri, 15 Oct 2004 01:58:39 +0000
Subject: problem with array
Groups: php.general 
Request: Send a blank email to php-general+get-199548@lists.php.net to get a copy of this message
Hi guys, Recently, I had to reformat one of the web servers and now I have encountered an unusual problem. I am not sure whether this is an issue which can be fixed in the .ini file or whether its specific to the version of php I am using. Here is the problem: $query="SELECT * FROM customizeViewClients WHERE employeeNum = $employeeNum"; $results=mssql_query($query, $connection) or die("Couldn't execute query"); $numRows=mssql_num_rows($results); if($numRows>0) { $row=mssql_fetch_array($results); } $selectedCol=$row["selectedCol"]; echo $selectedCol; $selectedColName=$row[$selectCol]; //<--- PLEASE NOTE THIS SPECIFIC ROW For some reason, on the last row, I am not unable to reference a particular index in the array using a php variable. This has been working for almost 12 months and now the coding is breaking all over the place. I don't have an answer. Any feedback would be greatly appreciated. Thx. Dale

« previous php.general (#199548) next »