#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    Reference Array value


    I am trying to use the Best Buy API to look up a product. I used their documentation like:
    PHP Code:
    $result $remix->products(array('sku=3815041'))
                    ->
    show(array('name''price','url'))
                    ->
    format('json')
                    ->
    query(); 
    and can show the data with

    PHP Code:
    echo $result
    But I am not figuring out how to reference just one of the values like just the 'name' of the product from that array.

    Any help is much appreciated.
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    Assuming the data in $result is JSON, you can use json_decode to convert it into an array.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo