note 18137 rejected from function.mssql-fetch-array by goba
| From: | goba@php.net | Date: | Wed, 08 Jan 2003 17:55:17 +0000 |
| Subject: | note 18137 rejected from function.mssql-fetch-array by goba | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-41846@lists.php.net to get a copy of this message | ||
Here´s an example of associative array:
<?php
connect("sqlserver","user","password");
$query = mysql_query("SELECT * FROM TABLE");
for ($i = 0;$line = mysql_fetch_array($query);++$i)
{
echo "Name: ".$line["name"];
echo "Address: ".$line["address"];
...
}
mysql_close();
?>
p.s.: the column name must be specified in '$line["colname"]'.