query ="SELECT short_label FROM config ORDER BY meter_num";
$result= @MSSQL_QUERY($query)
or die("Can't connect or something painfully obscure");
while($row = mysql_fetch_assoc($result)) {
${$short_label}=$row["short_label"];
}
That will, I believe, give you a list of variables/values such as: $short_label_1 = short_label_1 $short_label_2 = short_label_2
You can also adjust the variable name to your liking, such as:
${$short_label._counterPerhaps}=$row["short_label"];
The above should be correct, but I do admit that I don't use this technique daily.
To bad you cannot just throw your values into an associative array and pluck them when needed using $key => $value type of combinations.
-John
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php