| 
 Posted by flamer die.spam@hotmail.com on 07/18/06 23:20 
abracad_1999@yahoo.com wrote: 
 
> Is it possible to serve valid xhtml with php? 
> 
> xhtml requires the 1st line: 
>   <?xml version="1.0" encoding="iso-8859-1"?> 
> But php interprets the opening <? as a php statement. 
> 
> If I try to echo this in PHP: 
>   <?php 
>   echo '<?xml version="1.0" encoding="iso-8859-1"?>'; 
>   ?> 
> The closing ?> of the xhtml bit is interpreted as closing the php. 
> Thus: 
>   '; ?> 
> is displayed in the browser. 
> 
> Any way around this? 
 
Is it your server? turn off short_tags in your php conf. that way you 
can only use <?php not <? 
 
Flamer.
 
  
Navigation:
[Reply to this message] 
 |