note 39656 added to language.basic-syntax

From: Date: Fri, 06 Feb 2004 11:54:42 +0000
Subject: note 39656 added to language.basic-syntax
Groups: php.notes 
Request: Send a blank email to php-notes+get-64721@lists.php.net to get a copy of this message
Not spotted any messages like this one - delete it if there was one. My hosting service allows <? and ?>, but I like to use valid XHTML, so I came up with this simple solution: It is possible to use the short tags <? ?> with XHTML or XML documents. The only problem is that X(HT)ML requires a declaration using <? and ?> <?xml version="1.0" encoding="UTF-8"?> To avoid the problem, simply replace <? with <<? ?>? and ?> with ?<? ?>> <<? ?>?xml version="1.0" encoding="UTF-8"?<? ?>> This inserts a blank piece of PHP in between the < and ?, and when parsed will output the regular tag <?xml version="1.0" encoding="UTF-8"?> ---- Manual Page -- http://www.php.net/manual/en/language.basic-syntax.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39656 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39656&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39656&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64721) next »