Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Link an array from a URL and print array to a web page

    Howdy

    Novice here but what I'm trying to do is use an array that's printed to a webpage in a format like this

    Code:
    ["1","2","3","4","5","6","7","8","9"]
    The values are always different every time I reload the URL where the array comes from so what I'd like to do is exactly this:

    Get the values from the array

    Print a static URL for each array value and append the array value to the end of the URL.

    Would anybody be able to help me out as I'm a bit lost with this

    EDIT:

    Here's the URL to the webpage where I'll be getting the array from

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    That's a json array. You can get a PHP array out of it by using json_decode() function.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


  •  

    Tags for this Thread

    Posting Permissions

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