[TxMt] problem: php syntax bundle

Andreas Wahlin andreaswahlin at bredband.net
Sat Oct 8 08:30:16 UTC 2005


It seems the syntax parsing chokes on heredocs, code provided below

<?php
$xmlstr = <<<XML
<?xml version='1.0'?>
<movies>
     <movie>
           <title>PHP: Behind the Parser</title>
           <characters>
                <character>
                    <name>Ms. Coder</name>
                    <actor>Onlivia Actora</actor>
                </character>
           <plot>
                So, this language. It's like, a programming language.  
Or is it a
                scripting language? All is revealed in this thrilling  
horror spoof
                of a documentary.
           </plot>
           <rating type="thumbs">7</rating>
           <rating type="stars">5</rating>
      </movie>
</movies>
XML;

$xml = simplexml_load_string($xmlstr);

echo "<p>" . $xml->movie[0]->plot . "</p>";

?>

example taken and trimmed slightly from
http://se.php.net/simplexml

Andreas



More information about the textmate mailing list