SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Threaded View

  1. #1
    SitePoint Zealot
    Join Date
    Feb 2008
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Echo data in a three dimensional array

    Here is my array:
    Code:
    Array
    (
        [0] => Array
            (
                [name] => event_info
                [fql_result_set] => Array
                    (
                        [0] => Array
                            (
                                [name] => 8fr at Mission
                                [description] => 
                                [start_time] => 1359770400
                                [end_time] => 1359781200
                                [pic_small] => http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yy/r/XcB-JGXohjk.png
                                [pic_big] => http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yn/r/5uwzdFmIMKQ.png
                                [eid] => 143042695846457
                                [venue] => Array
                                    (
                                        [id] => 57444830184
                                    )
    
                                [location] => Mission Bar + Tapas
                            )
    
                        [1] => Array
                            (
                                [name] => 8fr at Mission
                                [description] => 
                                [start_time] => 1362189600
                                [end_time] => 1362200400
                                [pic_small] => http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yy/r/XcB-JGXohjk.png
                                [pic_big] => http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yn/r/5uwzdFmIMKQ.png
                                [eid] => 115985141901382
                                [venue] => Array
                                    (
                                        [id] => 57444830184
                                    )
    
                                [location] => Mission Bar + Tapas
                            )
    
                    )
    
            )
    
        [1] => Array
            (
                [name] => event_venue
                [fql_result_set] => Array
                    (
                        [0] => Array
                            (
                                [name] => Mission Bar + Tapas
                                [username] => 
                                [page_id] => 57444830184
                                [location] => Array
                                    (
                                        [street] => 438 North Street
                                        [city] => Pittsfield
                                        [state] => MA
                                        [country] => United States
                                        [zip] => 01201
                                        [latitude] => 42.45488011426
                                        [longitude] => -73.251895160061
                                    )
    
                            )
    
                    )
    
            )
    
    )
    The first section is a series of events (there are 2 events). The second is a series of venues (there is 1 venue). I am looking to write a foreach loop and then echo the the event info for each event and include the venue info that matches that event. For example:

    Event Name: 8fr at Mission [img]
    Address: Mission Bar + Tapas, 438 North Street, Pittsfield, MA
    Last edited by ggeiger; Jan 18, 2013 at 13:24. Reason: typo


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •