Re: PHP and XHTML
| From: | Erik Price | Date: | Mon, 28 Jan 2002 23:49:18 +0000 |
| Subject: | Re: PHP and XHTML | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82493@lists.php.net to get a copy of this message | ||
On Saturday, January 26, 2002, at 05:49 PM, ,,, wrote:
When I have an <? xml version=1.0 ?> inside my php script it wont work since php parses it as php code. Will short_open_tag = Off solve it? I would really like to use <? ?> for the rest of my php code...there must be a better solution than Short_open_tagSomething to keep in mind -- I read somewhere that using short tags is in fact NOT in compliance with the rules of XHTML. I'm not sure where, though, because now that I think about it, there wouldn't be any tags at the time that the page is served by the web server. Hmm... Google to the rescue. Look right in the first couple of paragraphs of the following: http://unixtech.be/docs/php/language.basic-syntax.html "While the short-form tags and ASP-style tags may be convenient, they are not as portable as the longer versions. Also, if you intend to embed PHP code in XML or XHTML, you will need to use the <?php. . .?> form to conform to the XML. " Better whip out that batch-file regex!! :) Erik