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
https://forums.phpfreaks.com/topic/101804-multidimensional-array/
Share on other sites

Absolutely 100%

 

I really need to know how to echo/print ---"ALBUMS/Holmes_Adams/P1040050.jpg"--- (within a foreach loop) from the two arrays.

 

 

http://www.rememberthetimephotos.com/ALBUMS/Holmes_Adams/P1040050.jpg  <-- picture path

 

 

Don't mind the picture...It's kind of scary:)

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.