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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.