Jump to content

usiang variable in simplexml url


DigitalF

Recommended Posts

Hello,

 

I'm a total noob and i don't know if this is the right forum section for this question.

 

My question is this:

 

I'm loading a xml from an url this way

$data = simplexml_load_file("http://api.domain.com/report.ashx?from=05/01/2013&to=06/01/2013&data=19401")

Everything works  but now I want to replace the from and to dates by the variables $start_date  and $curr_date, so something like this

$data = simplexml_load_file("http://api.domain.com/report.ashx?from=$start_date&to=$curr_date&data=19401")

What would be the correct way to do this, i guess it's pretty simple, but like I said I'm a total noob so any help would be greatly appreciated!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.