XHTML and PHP

From: Date: Sat, 29 Sep 2001 07:35:24 +0000
Subject: XHTML and PHP
Groups: php.general 
Request: Send a blank email to php-general+get-69258@lists.php.net to get a copy of this message
Hello intelligent folks... I have a problem with XHTML and PHP The first line of an XHTML document must include an XML processing instruction, as such: <?xml version="1.0" encoding="UTF-8"?> But PHP will parse it as PHP code because of the question marks. How do I get around this problem? I don't want PHP to read that element as PHP, I want it to leave it alone the way it is. I tried echoing the tag and escaping the question marks, etc, but that did not work. I also tried searching on php.net, and many other sources, but all they talk about is the parsing of XML files. Any suggestions to my problem? I have included an example below. Thanks in advance to the one(s) who can answer this for me, it would be very much appreciated. This is very basic (index.php): ------------------- <?php // INCLUDE header.php include("index/brwsr6/header.php"); // INCLUDE top_bar.php include("index/brwsr6/top_bar.php"); // INCLUDE top_nav.php include("index/brwsr6/top_nav.php"); // INCLUDE left_bar.php include("index/brwsr6/left_bar.php"); // INCLUDE content_area.php include("index/brwsr6/content_area.php"); // INCLUDE right_bar.php include("index/brwsr6/right_bar.php"); // INCLUDE footer.php include("index/brwsr6/footer.php"); ?> header.php ----------- <!-- START header.php --> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Some Title</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="home/style/style1.css" type="text/css" /> </head> <body bgcolor="#ffffff" style="margin:0px"> <!-- END header.php --> Navid

« previous php.general (#69258) next »