Ladies and gentlemen, let's check the syntax. it's difficult for me to look at the usage of quotation marks! I plan to output a piece of XML in PHP. there is always an error and the syntax is incorrect! PHPcode $ strXML. & quot; & lt; setname & quot; date_format ($ row [& quot; DatePro & quot;], % Y-% m) & quot; value & quot ;. $ row [& qu, bosses. Please check the syntax and use quotation marks!
I plan to output a piece of XML in PHP. there is always an error and the syntax is incorrect!
PHP code
$strXML .= "
";
Please advise. thank you !!
------ Solution --------------------
PHP code
Date_format ($ row ["DatePro"], '% Y-% M') missing connectors
------ Solution --------------------
$ StrXML. ="
";
------ Solution --------------------
Date_format has Format requirements for parameters.
You can try date_format (date_create ($ row ["DatePro"]), '% Y-% M ')
------ Solution --------------------
The first parameter of date_format should be DateTime-type data.
------ Solution --------------------
I have read the function description and added $ date = date_create ($ xxx). let's take a look, as we have already mentioned in the previous section 10 thousand.
------ Solution --------------------
PHP code
Strtotime ("Y-m-d H: I: s") // date ("Y-m-d H: I: s", time ()) // output the timestamp format to the format