I’m new to php so pardon the ignorance
I’m trying to include a php variable, it is and is not working.
$currentdata = file_get_contents("http://www.abr.business.gov.au/abnDetails.aspx?abn=$abn");
This works with $abn being the variable being passed from earlier being set.
$abntypedata = '/d$abn&ResultListURL=">(.+?)</'; This does not work.
$abntypedata = '/d33051775556&ResultListURL=">(.+?)</'; This does.
I need to be able to use the variable $abn to insert that number as it will be user defined. Why is this not working?
Php is perticular about the quotations. You have to use double quotes to include variables:
or