Hey I figured out my problem.  Instead of using a foreach loop, I used a 
  while loop and everything is cool man :).
UPDATED CODE:

$query = "DESCRIBE mpn_users";
$result = mysql_query($query);
while ($data = mysql_fetch_array($result)){
         echo "$data[0],  $data[1],  $data[2]<br>";
}

Gerard Samuel wrote:
> Im trying to get results from a mysql command (describe tablename;)
> into php.  I know about the php functions, but I would like the mysql 
> nameing instead.  Im trying like so
> 
> 
> $query = "DESCRIBE users";
> $result = mysql_query($query);
> $array = mysql_fetch_array($result);
> foreach ($array as $data) {
>         echo "$data[0], $data[1], $data[2]<br>";
> }
> 
> 
> Im not getting the expected results like the mysql command line.
> What am I doing wrong...
> Thanks
> 
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to