Hey all,
I have encountered something strange in a script. I am trying to write an XML header and then fill in the file:
Code: $xmlFile = "fetchableData.xml";
$fh = fopen($xmlFile, 'r+');
$housingData = updateHousingAndReturnXML();
$xmlData = '<?xml version="1.0" ?>'.$housingData;
// echo $xmlData;
fwrite($fh,$xmlData);
fclose($fh);
This code fills the file with the contents of $housingData, but <?xml version="1.0" ?> is not added. If I break up <? it will add it but then I get errors when parsing the XML.
Echoing the string also doesn't work with <?.
I guess what is happening is that the string is getting parsed by the PHP engine for some reason. Escaping <? doesn't work.
I am assuming I am missing something basic. But the manual doesn't say anything about <? being parsed in strings.
Help?
Thanks
MySQL Does not UPDATE- SQLString Problem
vb Syntax (Toggle Plain Text)
rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?
records between 2 dates
Hello all,
Need help making login verification cleaner...
I use the below to verify user login. I first check the cookie for the id, ip and a unique id. If it's set then I move on to verifying that they all belong together. I usually copy and paste
count only commas outside parenteses
I have a sql table containing id - query - query namethe first page contains a drop down menu of all the query names. When chosen the user is sent to a page that prints the result of the query in a
array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.// foreach store id// foreach product id {// query with where store id and product id// get price row for each
mysql UPDATE request not working and driving me crazy!!!
Hi,I have been stuck on this for ages.Quite simply I am trying to update my database with an update command:Code: $query="UPDATE `spence13_Portfolio`.`skillsList` SET `skillName` =
Why is this function returning a false value when it shouldn't be??
This is in an include file. I want it to check a value in an html form and see if it's just white space, is numbers, is empty etc.Code: (text) [Select]<?phpfunction
Running External Scripts
I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaWiki on my site and I'm trying to install some extensions. In order to install the Search
how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons selected?Code: