PHP : mysql_fetch_row() function
Description
The mysql_fetch_row() is used to fetch a row of data from a result handle.
Version
(PHP 4 and above)
Syntax
mysql_fetch_row(result)
Parameter
| Name | Description | Required/ Optional | Type |
|---|---|---|---|
| result | Refers to the resource return by a valid mysql query (calling by mysql_query() function). | Required | Resource |
Return value
An numerical array containing the fetched row, or FALSE if there are no more rows.
Value Type : Array.
Example :
<?php
mysql_connect("localhost", "root", "mypass");
mysql_select_db("tutorials");
$result = mysql_query("select * from tutorials");
$row = mysql_fetch_row($result);
echo $row[1];
?>
Output :
html
See also

