Jump to content

How would you print this array values?


bilis_money

Recommended Posts

guys?

ok, let say i have these array structure:

[code]
Array
(
    [s_id] => 91
    [s_photo_filename] => logo03.gif
    [s_tmp_name] =>
    [s_type] => image/gif
    [s_size] => 4612
    [s_path] =>
    [s_date] => 2006-06-25
    [s_comments] => TEsting, testing
    [s_photo_category] =>
)
[/code]

now i know that the keys of the array are in string and not in intergers.
how would you loop and move the array pointer from 0 to 9?

i know these codes below are not possible because the array keys is in strings.
[code]
while($i < 9) {
$result = $_session[$i]; //this will not work
echo "$i: ". $result. "<br>";
$i++;
}
[/code]

now what's your way of solving this?


thanks in advance.
Link to comment
https://forums.phpfreaks.com/topic/14534-how-would-you-print-this-array-values/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.