mysql - php showing multiple echo when retrieving from the database -


hiii, getting multiple value form database when using foreach, plz help

function display($host,$user,$pass,$database)       {         $db = mysql_connect($host, $user, $pass);          mysql_select_db ($database);                 $query = "select * `sysdes_moduleinfo`";          $result = mysql_query($query) or die(mysql_error());          $i=0;         while($row = mysql_fetch_array($result))          {             /*$max = count($row);             while($i<6) {             echo $row[$i]." ";             $i++;             }*/             foreach ($row $value)             {                 //echo $value . " ";                 echo htmlspecialchars($value);              }             echo "<br/>";         } 

this code. enter image description here.

this have in database. enter image description here

while($row = mysql_fetch_array($result, mysql_assoc))  {        foreach ($row $value)        {            //echo $value . " ";            echo htmlspecialchars($value);        }        echo "<br/>";  } 

mysql_fetch_array returns both numeric , associative array.


Comments