Ray,

You could create an array where the keys are the person names and the
values are the strings. For example:

$people_strings = array ("joe" => "bar", "andy" => "foo");
ksort($people_strings);
reset($people_strings);
while (list ($key, $value) = each ($people_strings)) {
        print "$key -> $value\n";
}

That should print out:

andy -> foo
joe -> bar

The ksort is the magic part, it sorts arrays by their keys.


Regards,

Sean Cazzell


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