It is showing "Array" probably because you do
echo $rows; 
and because $rows is array you receive "Array";
try
foreach($rows as $k=>$v){
    print "\n[$k][$v]<br>";
}

Regards,
Andrey
----- Original Message ----- 
From: "Uma Shankari T." <[EMAIL PROTECTED]>
To: "Andrey Hristov" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 1:24 PM
Subject: Re: [PHP] Store data in array


> 
> 
> On Mon, 18 Mar 2002, Andrey Hristov wrote:
> 
> AH>If it is possible do the sorting in the SQL statement by using ORDER BY. SQL 
>sorting is much faster than in PHP.
> AH>However
> 
> I have gone through that manual already....but i need to sort by php
> sorting.
> 
> AH>while ($row= mysql_fetch_assoc($res)){ $rows[] = $row; }
> AH>
> 
> I have tried this but while sorting using php sort it is displaying array
> only.If the elements are stored in the array properly i can perform 
> sorting.
> 
> please tell me how to extract a specific field from mysql database and
> store it in array...
> 
> AH>Then you have many ways to sort. Look at : sort(), asort(), arsort(), usort(), 
>uasort() etc.
> AH>
> AH>Best regards,
> AH>Andrey Hristov
> AH>
> AH>----- Original Message ----- 
> AH>From: "Uma Shankari T." <[EMAIL PROTECTED]>
> AH>To: <[EMAIL PROTECTED]>
> AH>Sent: Monday, March 18, 2002 12:25 PM
> AH>Subject: [PHP] Store data in array
> AH>
> AH>
> AH>> 
> AH>> 
> AH>> Hello,
> AH>> 
> AH>> Anyone can please tell me how to store the row details fetched from
> AH>> database to array so that to sort the same array after storing....
> AH>> 
> AH>> 
> AH>> -Uma
> AH>> 
> AH>> 
> AH>> -- 
> AH>> PHP General Mailing List (http://www.php.net/)
> AH>> To unsubscribe, visit: http://www.php.net/unsub.php
> AH>> 
> AH>> 
> AH>
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


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

Reply via email to