note 18137 added to function.mssql-fetch-array
| From: | Yagi | Date: | Fri, 11 Jan 2002 18:05:01 +0000 |
| Subject: | note 18137 added to function.mssql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24677@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"]'.
--
http://www.php.net/manual/en/function.mssql-fetch-array.php
http://master.php.net/manage/user-notes.php?action=edit+18137
http://master.php.net/manage/user-notes.php?action=delete+18137
http://master.php.net/manage/user-notes.php?action=reject+18137