Need some PHP Help

Discussion in 'Web Design and Development' started by EV0LUTION, Nov 23, 2008.

  1. EV0LUTION macrumors 6502

    EV0LUTION

    Joined:
    Jul 21, 2008
    Location:
    Florida
    #1
    just letting you guys know I am very new to php.

    I'm creating a small script that generates an xbox live gamercard, and need some help with adding the recent games to it.

    I'm using http://duncanmackenzie.net/services/XboxInfo.asmx to populate the recent game data, but the data it gives me looks like this:

    PHP:
    [1] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    B][Name] => UNO
                                        
    [TotalAchievements] => 12
                                        
    [TotalGamerScore] => 200[/B]
                                        [
    Image32Url] => [url]http://tiles.xbox.com/tiles/zK/X6/1mdsb2JgbA9ECgUAGwEfWSlQL2ljb24vMC84MDAwIAABAAAAAPnVpdM=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/ow/vO/0Wdsb2JhbC9ECgUAGwEfWSlQL2ljb24vMC84MDAwAAAAAAAAAP7hC7w=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-21T22:10:01-06:00
                                
    [Achievements] => 12
                                
    [GamerScore] => 200
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3bhe)j%3c%0c%02&compareTo=EV0LUTION+X[/url]
                            
    )
    I need the script to ignore the bolded area in order to populate the images, I am completely clueless on how to do this.

    Can anyone help?
    This is what I have so far (as you can see only one recent game posted):
    [​IMG]
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Can you post your script? Hard to tell you how to change it if we can't see it.
     
  3. EV0LUTION thread starter macrumors 6502

    EV0LUTION

    Joined:
    Jul 21, 2008
    Location:
    Florida
    #3
    This is the bit that needs work on:

    $g1startstring = '[Image32Url] => ';
    $g1start = strpos($card2, $g1startstring, 0)+strlen($g1startstring);
    $g1end = strpos($card2, '[Im', $g1start);
    $g1url = substr($card2, $g1start, $g1end-$g1start);

    I need the bolded section in my first post to be ignored so I can get all the games in. Currently I just know how to get one.
     
  4. savar macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #4
    Looks like the first thing you need to is learn PHP SOAP: http://us3.php.net/soap

    It seems you're trying to parse the feed manually, which will eventually end up in disaster.

    Once you get up and running with that, I think what you need to do will be a lot more obvious.
     
  5. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #5
    To expand a little on savar's excellent advice which is right on the money...

    The output you edited into your orginal post is probably debugging output generated by an introspection function written into the PHP class or framework you're using for the SOAP call. Then in your next post you wrote some actual PHP code to change the debugging output so it can be displayed to the end user. That's not the purpose of debugging code, which is intended to show a developer the SOAP result set after the call similar to how the print_r() function in PHP works. The class or framework you're using, if well written, should also generate the results to you in an associative array of your naming where you can pick out what you need and format as you see fit and then display to the end user.

    If you get hopelessly stuck, as this is somewhat more advanced stuff, please post a link to the PHP SOAP class or framework you're using so we can help you better (or code, if no link available).

    -jim
     
  6. EV0LUTION thread starter macrumors 6502

    EV0LUTION

    Joined:
    Jul 21, 2008
    Location:
    Florida
    #6
    Ok, this what I get from the API I'm using, I have no way of editing it so I'm stuck with what I've got. As you all can see there are multiple recent games, and I need a way to get to the [Image32Url] => bit.

    PHP:
     stdClass Object
    (
        [
    AccountStatus] => Gold
        
    [PresenceInfo] => stdClass Object
            
    (
                [
    Valid] => 1
                
    [Info] => Last seen 6 minutes ago playing NFS Undercover
                
    [Info2] => Navigating Menus
                
    [LastSeen] => 2008-11-24T14:23:45-06:00
                
    [Online] => 1
                
    [StatusText] => Away
                
    [Title] => NFS Undercover
            
    )

        [
    State] => Valid
        
    [Gamertag] => Major Nelson
        
    [ProfileUrl] => [url]http://live.xbox.com/member/Major%20Nelson[/url]
        
    [TileUrl] => [url]http://avatar.xboxlive.com/avatar/Major%20Nelson/avatarpic-l.png[/url]
        
    [Country] => United States
        
    [Reputation] => 99.86009
        
    [Bio] => Text messages only no random chat requestsI can not provide support helpNow that I have that out of the wayYes I work for Microsoft.  (I don't work for Bungie). If you really want to find out more about me, you should visit [url]www.majornelson.com[/url]. Please remember that I am not the person to ask for game specific assistance. That includes 'When is...' and 'Do you know...' game questions.  :)  
        [Location] => Gunter glieben glauten globen
        [ReputationImageUrl] => [url]http://live.xbox.com/xweb/lib/images/gc_repstars_external_20.gif[/url]
        [GamerScore] => 23241
        [Zone] => Recreation
        [RecentGames] => stdClass Object
            (
                [XboxUserGameInfo] => Array
                    (
                        [0] => stdClass Object
                            (
                                [Game] => stdClass Object
                                    (
                                        [Name] => NFS Undercover
                                        [TotalAchievements] => 50
                                        [TotalGamerScore] => 1000
                                        [Image32Url] => [url]http://tiles.xbox.com/tiles/kq/b6/0Wdsb2JgbA9ECgQNGwEfVlhVL2ljb24vMC84MDAwIAABAAAAAP7Vpo0=.jpg[/url]
                                        [Image64Url] => [url]http://tiles.xbox.com/tiles/-Q/jO/1mdsb2JhbC9ECgQNGwEfVlhVL2ljb24vMC84MDAwAAAAAAAAAPnhCOI=.jpg[/url]
                                    )

                                [LastPlayed] => 2008-11-24T10:16:21-06:00
                                [Achievements] => 5
                                [GamerScore] => 60
                                [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3adh)k%3f%7fv&compareTo=Major+Nelson[/url]
                            )

                        [1] => stdClass Object
                            (
                                [Game] => stdClass Object
                                    (
                                        [Name] => CW: Secret Missions

                                        [TotalAchievements] => 40
                                        [TotalGamerScore] => 1000
                                        [Image32Url] => [url]http://tiles.xbox.com/tiles/wU/1t/02dsb2JgbA9ECgQJGgYfVl1WL2ljb24vMC84MDAwIAABAAAAAPxCTd4=.jpg[/url]
                                        [Image64Url] => [url]http://tiles.xbox.com/tiles/ru/NZ/1Gdsb2JhbC9ECgQJGgYfVl1WL2ljb24vMC84MDAwAAAAAAAAAPt247E=.jpg[/url]
                                    )

                                [LastPlayed] => 2008-11-23T23:20:40-06:00
                                [Achievements] => 0
                                [GamerScore] => 0
                                [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3a%60m%2fl%3b%7fv&compareTo=Major+Nelson[/url]
                            )

                        [2] => stdClass Object
                            (
                                [Game] => stdClass Object
                                    (
                                        [Name] => Secret Service
                                        [TotalAchievements] => 48
                                        [TotalGamerScore] => 1000
                                        [Image32Url] => [url]http://tiles.xbox.com/tiles/KQ/0O/0mdsb2JgbA9ECgQJGgYfVl1XL2ljb24vMC84MDAwIAABAAAAAP0hDTY=.jpg[/url]
                                        [Image64Url] => [url]http://tiles.xbox.com/tiles/Rq/M6/1Wdsb2JhbC9ECgQJGgYfVl1XL2ljb24vMC84MDAwAAAAAAAAAPoVo1k=.jpg[/url]
                                    )

                                [LastPlayed] => 2008-11-23T21:36:36-06:00
                                [Achievements] => 0
                                [GamerScore] => 0
                                [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3a%60m%2fl%3b%7fw&compareTo=Major+Nelson[/url]
                            )

                        [3] => stdClass Object
                            (
                                [Game] => stdClass Object
                                    (
                                        [Name] => Legendary
                                        [TotalAchievements] => 50
                                        [TotalGamerScore] => 1000
                                        [Image32Url] => [url]http://tiles.xbox.com/tiles/4B/fY/1mdsb2JgbA9ECgQPGgAfWStQL2ljb24vMC84MDAwIAABAAAAAPn3F-8=.jpg[/url]
                                        [Image64Url] => [url]http://tiles.xbox.com/tiles/j7/ns/0Wdsb2JhbC9ECgQPGgAfWStQL2ljb24vMC84MDAwAAAAAAAAAP7DuZA=.jpg[/url]
                                    )

                                [LastPlayed] => 2008-11-23T21:16:25-06:00
                                [Achievements] => 0
                                [GamerScore] => 0
                                [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3afk)j2e4X6z-17e4X6z-17&compareTo=Major+Nelson[/url]
                            )

                        [4] => stdClass Object
                            (
                                [Game] => stdClass Object
                                    (
                                        [Name] => SmackDown vs. RAW 2009
                                        [TotalAchievements] => 18
                                        [TotalGamerScore] => 1000
                                        [Image32Url] => [url]http://tiles.xbox.com/tiles/Su/KC/0Gdsb2JgbA9ECgUMGgEfVl1VL2ljb24vMC84MDAwIAABAAAAAP+t4lU=.jpg[/url]
                                        [Image64Url] => [url]http://tiles.xbox.com/tiles/JU/y2/12dsb2JhbC9ECgUMGgEfVl1VL2ljb24vMC84MDAwAAAAAAAAAPiZTDo=.jpg[/url]
                                    )

                                [LastPlayed] => 2008-11-23T21:15:44-06:00
                                [Achievements] => 0
                                [GamerScore] => 0
                                [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3bdh(j%3fzr&compareTo=Major+Nelson[/url]
                            )

                        [5] => stdClass Object
                            (
                                [Game] => stdClass Object
                                    (
                                        [Name] => Mirror'
    s Edge™
                                        
    [TotalAchievements] => 44
                                        
    [TotalGamerScore] => 1000
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/Yw/h7/1Wdsb2JgbA9ECgQNGwEfVlpTL2ljb24vMC84MDAwIAABAAAAAPpUCHw=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/DK/ZP/0mdsb2JhbC9ECgQNGwEfVlpTL2ljb24vMC84MDAwAAAAAAAAAP1gphM=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-23T20:52:43-06:00
                                
    [Achievements] => 2
                                
    [GamerScore] => 30
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3adh)k%3f%7dr&compareTo=Major+Nelson[/url]
                            
    )

                        [
    6] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    Name] => Vigilante 8 Arcade
                                        
    [TotalAchievements] => 12
                                        
    [TotalGamerScore] => 200
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/Yk/rq/0mdsb2JgbA9ECgUAGwEfVi5bL2ljb24vMC84MDAwIAABAAAAAP3FSn0=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/De/Te/1Wdsb2JhbC9ECgUAGwEfVi5bL2ljb24vMC84MDAwAAAAAAAAAPrx5BI=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-23T19:32:56-06:00
                                
    [Achievements] => 1
                                
    [GamerScore] => 5
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3bhe)j3%04%0e&compareTo=Major+Nelson[/url]
                            
    )

                        [
    7] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    Name] => PortalStill Alive
                                        
    [TotalAchievements] => 12
                                        
    [TotalGamerScore] => 200
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/IW/nb/1Gdsb2JgbA9ECgUAGwEfV1lTL2ljb24vMC84MDAwIAABAAAAAPv0aT4=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/Ts/fv/02dsb2JhbC9ECgUAGwEfV1lTL2ljb24vMC84MDAwAAAAAAAAAPzAx1E=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-23T19:19:01-06:00
                                
    [Achievements] => 0
                                
    [GamerScore] => 0
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3bhe)j2rq&compareTo=Major+Nelson[/url]
                            
    )

                        [
    8] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    Name] => Far Cry® 2
                                        
    [TotalAchievements] => 48
                                        
    [TotalGamerScore] => 1000
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/2Z/tA/0Wdsb2JgbA9ECgUNGgMfVl5TL2ljb24vMC84MDAwIAABAAAAAP5vm8Y=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/tj/V0/1mdsb2JhbC9ECgUNGgMfVl5TL2ljb24vMC84MDAwAAAAAAAAAPlbNak=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-23T00:33:18-06:00
                                
    [Achievements] => 2
                                
    [GamerScore] => 20
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3bei*h%3exu&compareTo=Major+Nelson[/url]
                            
    )

                        [
    9] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    Name] => Fallout 3
                                        
    [TotalAchievements] => 50
                                        
    [TotalGamerScore] => 1000
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/lp/Cu/1Wdsb2JgbA9ECgQKGgMfWStWL2ljb24vMC84MDAwIAABAAAAAPqBkIk=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/+T/6a/0mdsb2JhbC9ECgQKGgMfWStWL2ljb24vMC84MDAwAAAAAAAAAP21PuY=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-21T22:12:03-06:00
                                
    [Achievements] => 24
                                
    [GamerScore] => 480
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3acn*i7%05%05&compareTo=Major+Nelson[/url]
                            
    )

                        [
    10] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    Name] => Midnight ClubLA
                                        
    [TotalAchievements] => 45
                                        
    [TotalGamerScore] => 1000
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/DK/hy/1Wdsb2JgbA9ECgUMGgQfWSlbL2ljb24vMC84MDAwIAABAAAAAPpdqBM=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/Yw/ZG/0mdsb2JhbC9ECgUMGgQfWSlbL2ljb24vMC84MDAwAAAAAAAAAP1pBnw=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-21T15:52:51-06:00
                                
    [Achievements] => 1
                                
    [GamerScore] => 10
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3bdh-o0%01%0d&compareTo=Major+Nelson[/url]
                            
    )

                        [
    11] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    Name] => Scene ItBOS!
                                        [
    TotalAchievements] => 50
                                        
    [TotalGamerScore] => 1000
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/99/uo/02dsb2JgbA9ECgR8GgMfVllTL2ljb24vMC84MDAwIAABAAAAAPyH2+g=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/mH/Wc/1Gdsb2JhbC9ECgR8GgMfVllTL2ljb24vMC84MDAwAAAAAAAAAPuzdYc=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-12T21:22:34-06:00
                                
    [Achievements] => 20
                                
    [GamerScore] => 440
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3a%15%18*iN%0er&compareTo=Major+Nelson[/url]
                            
    )

                        [
    12] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    Name] => Xbox 360 Team
                                        
    [TotalAchievements] => 1
                                        
    [TotalGamerScore] => 0
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/m5/p1/0Gdsb2JgbA9ECnZ+aXUfWSkiL2ljb24vMC84MDAwIAABAAAAAP9amoQ=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/9D/RB/12dsb2JhbC9ECnZ+aXUfWSkiL2ljb24vMC84MDAwAAAAAAAAAPhuNOs=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 1752-12-31T18:00:00-06:00
                                
    [Achievements] => 1
                                
    [GamerScore] => 0
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5dHei%2fm1e4X6z-17v&compareTo=Major+Nelson[/url]
                            
    )

                        [
    13] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    Name] => Left 4 Dead
                                        
    [TotalAchievements] => 50
                                        
    [TotalGamerScore] => 1000
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/4H/0l/0Wdsb2JgbA9ECgQNGwEfVlxTL2ljb24vMC84MDAwIAABAAAAAP4Kff8=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/j9/MR/1mdsb2JhbC9ECgQNGwEfVlxTL2ljb24vMC84MDAwAAAAAAAAAPk+05A=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-18T22:57:53-06:00
                                
    [Achievements] => 1
                                
    [GamerScore] => 10
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3adh)k%3f%7bt&compareTo=Major+Nelson[/url]
                            
    )

                        [
    14] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    Name] => Quantum of Solace
                                        
    [TotalAchievements] => 50
                                        
    [TotalGamerScore] => 1000
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/gw/y-/1mdsb2JgbA9ECgQJGgYfWSklL2ljb24vMC84MDAwIAABAAAAAPmQDJw=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/7K/KL/0Wdsb2JhbC9ECgQJGgYfWSklL2ljb24vMC84MDAwAAAAAAAAAP6kovM=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-18T17:07:06-06:00
                                
    [Achievements] => 18
                                
    [GamerScore] => 295
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3a%60m%2fl4%04q&compareTo=Major+Nelson[/url]
                            
    )

                        [
    15] => stdClass Object
                            
    (
                                [
    Game] => stdClass Object
                                    
    (
                                        [
    Name] => Banjo KazooieN&B
                                        
    [TotalAchievements] => 50
                                        
    [TotalGamerScore] => 1000
                                        
    [Image32Url] => [url]http://tiles.xbox.com/tiles/WS/Yo/0Wdsb2JgbA9ECgR8GgMfWSonL2ljb24vMC84MDAwIAABAAAAAP4HJkY=.jpg[/url]
                                        
    [Image64Url] => [url]http://tiles.xbox.com/tiles/No/gc/1mdsb2JhbC9ECgR8GgMfWSonL2ljb24vMC84MDAwAAAAAAAAAPkziCk=.jpg[/url]
                                    
    )

                                [
    LastPlayed] => 2008-11-18T11:44:22-06:00
                                
    [Achievements] => 1
                                
    [GamerScore] => 10
                                
    [DetailsURL] => [url]http://live.xbox.com/en-US/profile/Achievements/ViewAchievementDetails.aspx?tid=%09%5d%3a%15%18*iAru&compareTo=Major+Nelson
                            
    )

                    )

            )

    )
     
  7. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #7
    That's a result set, probably debugging output as noted earlier. At this point I need to see the entire class or framework that generated that output. The API you're using, client side only, i.e the link where you downloaded it would be nice. I need to read its documentation or comments in the code so I can then show you how to get the result set as an associative array so we can write our own code to walk through the array and grab the bit you need.

    The way you're doing is now is like parsing a flat file - it can work that way, but not the way its supposed to work.

    Note: I've had to edit my replies since you edited your posts a few times, this is causing confusion. Please do not edit any more replies that include code, thanks.

    -jim
     
  8. EV0LUTION thread starter macrumors 6502

    EV0LUTION

    Joined:
    Jul 21, 2008
    Location:
    Florida
    #8
    Thanks for the reply

    This is where the API is from http://code.google.com/p/php-gamercard-api/

    Sorry for the edits
     
  9. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #9
    As per the directions on that page to retreive the data, please run this:

    require_once('Gamercard.php');
    $gamercard = new Gamercard("http://duncanmackenzie.net/services/XboxInfo.asmx");
    $data = $gamercard->data();
    print_r($data); // for debugging purposes only
    // your code goes here to search the array for your criteria using your own code

    The output is now in a variable called $data which should be an associative arrary. Then all you need to do is search for the key you want and retrieve its value so you can format it as you want. The only difference between this method and yours is you're working with an associative array, not print output of the debugging of an associative array.

    Help with PHP associative array keys: http://us3.php.net/function.array-keys

    Plenty of useful scripts added by users on that help page to show you how to retreive keys from multidimensional arrays, which is your situation.

    -jim
     
  10. EV0LUTION thread starter macrumors 6502

    EV0LUTION

    Joined:
    Jul 21, 2008
    Location:
    Florida
    #10
    Thanks, my original problem still exists though
     
  11. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #11
    I've set you straight so you're no longer modifying debugging output and instead sending the output to an associative array. I've given you links with functions and advice on how to walk through a PHP associative array to pull out what you need (or don't need).

    Did you expect someone here to write the entire PHP code for you? That's not rhetorical, I am asking. This is not to say it's impossible, if it's not too complex I'll give it a shot. Fair enough?

    If so, please cite an example of what you want the final output to be? This would be most helpful to me.

    -jim

    ps: To anyone else reading this who's started already, be sure to download the SOAP wrapper and run it and generate the $data array because the debugging output above might be customized, not the same as print_r(), my .02
     

Share This Page