Hello all,
Please refer the following code.
<?php
include 'connection.php';
$query = "SELECT currency_description FROM currency_m ORDER BY currency_description";
$result = mysql_query($query) or die ("SELECT failed.");
$ctr = mysql_num_rows($result) ;
echo "The records obtained are " ; echo $ctr ; echo "<br>" ;
while ($list = mysql_fetch_array($result))
{
echo " Current element is " ;
echo $list[currency_description] ; echo "<br>";
}
?>
Is it possible to assign the values obtained in the query to an array? What will be the code for that ?