Jump to content

Multidimensional Array


phpretard

Recommended Posts

I can see where the problem lies but cant find the answer.

 

Can anyone tell me why I can't see the pictures?

 


echo '<pre>$_SESSION:' . print_r($_SESSION,true) . '</pre>';

The Above Yeilds This In The Browser:

$_SESSION:Array
(
    [P1040050.jpg] => Array
        (
            [picture] => ALBUMS/Holmes_Adams/P1040050.jpg  //<----PICTURE 1 LOCATION
            [file] => P1040050.jpg
            [s46] => 4 x 6
            [QU46] => 10
            [s57] => 5 x 7
            [QU57] => 20
            [s810] => 8 x 10
            [QU810] => 30
            [order_photo] => Order This Photo
        )

    [P1040052.jpg] => Array
        (
            [picture] => ALBUMS/Holmes_Adams/P1040052.jpg  //<------PICTURE 2 LOCATION
            [file] => P1040052.jpg
            [s46] => 4 x 6
            [QU46] => 30
            [s57] => 5 x 7
            [QU57] => 20
            [s810] => 8 x 10
            [QU810] => 10
            [order_photo] => Order This Photo
        )

)



foreach ($_SESSION as $file => $val){

echo"<img src='" . $_SESSION['picture_id']['picture'] . "'>";

}

 

I was expecting 2 pictures to show up based on the session variables...all I get is an unidentified picture.

 

I have been reading about this and can't pick up the answer anywhere.

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.