Re: mysql_fetch_row() and mysql_fetch_array()?
| From: | Ignacio Vazquez-Abrams | Date: | Wed, 17 Jan 2001 23:23:47 +0000 |
| Subject: | Re: mysql_fetch_row() and mysql_fetch_array()? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35207@lists.php.net to get a copy of this message | ||
On Thu, 18 Jan 2001, Jimmy Bäckström wrote:
> Yo!
> I am wondering what the difference is between mysql_fetch_array and mysql_fetch_row. I tried
> using this code:
> $result = query("SELECT * FROM index1");
>
> while ($row = mysql_fetch_row($result)) {...
> but $row[] does not contain any data, but when I changed it to:
> $row = mysql_fetch_array($result) ... it worked just fine.
>
> So what is the difference?
> /Jimmy
>
mysql_fetch_row() uses numeric indices, whereas mysql_fetch_array() can also
provide string indices.
--
Ignacio Vazquez-Abrams <ignacio@openservices.net>