That is not a two dimensional array. Its two one dimensional arrays and yo do it like this

while ($row = mysql_fetch_array($result))
{

 $title[]           =$row['title'];
 $description[]  =$row['description'];

 }



bastien

From: elk dolk <[EMAIL PROTECTED]>
To: "php-db@lists.php.net" <php-db@lists.php.net>
Subject: [PHP-DB] array
Date: Thu, 29 Mar 2007 13:29:45 -0700 (PDT)

Hi all,
I want to put result of query in a two dimensional array like this:

title[0]=x   description [0]=y
title[1]=z   description [1]=w
.........    ................

any idea would be appreciated

$query = "SELECT * FROM photo";
$result=mysql_query($query);


while ($row = mysql_fetch_array($result))
{

  $title=$row['title'];
  $description=$row['description'];

  }

---------------------------------
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.

_________________________________________________________________
Check Out Our List Of Trendy Restaurants. You'll Eat It Up! http://local.live.com/?mkt=en-ca/?v=2&cid=A6D6BDB4586E357F!378

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to