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
https://forums.phpfreaks.com/topic/279649-usiang-variable-in-simplexml-url/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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