Hello Everyone,

I would like to sort a list of array indices. The array is multi-
dimensional N x 3

for example, if (note the actual data is not important to my question):

$a[0]['a'] = 1, $a[0]['b'] = 2, $a[0]['c'] = 3
$a[1]['a'] = 1, $a[1]['b'] = 2, $a[1]['c'] = 3
$a[2]['a'] = 1, $a[2]['b'] = 2, $a[2]['c'] = 3

Q1) I will use the "usort" user sort function. I see the example for
multi-dimensional arrays in the manual (they use fruits, not a b c). Does
usort work in Windows (NT4 machine, PHP 4.04, running as cgi) ?

Q2) The array $a will be stored in a session. I will want to clear $a and
then  recreate and resort $a. How do I clear a variable or array ?

For example, if the first time I create $a it gets up to $a[30] (remember
$a is saved in a session), but if I recreate $a and the indices only go to
$a[20], I need to be sure $a[21] to $a[30] no longer exist. Easiest way:
clear $a before recreating it.

Q3) The $a array will be generated from the results of a mysql database
query. Is it realistic to save the results set ($res) of a query ($res =
mysql_query($sql)) in a session? I think the size of $res won't exceed
32KB. Is there a session storage size limit for Windows?

Thanks very much for your experience,
Barry.



-- 
PHP Windows 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