note 7838 deleted from Classes and Objects by ronabop
| From: | ronabop@php.net | Date: | Thu, 17 Aug 2000 10:04:47 +0000 |
| Subject: | note 7838 deleted from Classes and Objects by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2177@lists.php.net to get a copy of this message | ||
Silly me, but I can't find this documented anywhere. PHP/Apache stops parsing my HTML document
embedded with php code as soon as it sees the class operator "->"
Consider the code:
<HTML>
...some html here...
<?php
$newclass = new Class;
echo("message");
$newclass->method();
echo (nextmessage);
?>
some more html
</HTML>
The parse engine quits on the class operator "->". In other words, I get the first
echo string as one expects, but then my server stops executing at the class operator and then starts
shooting my code to the browser as text. Here is what my browser page looks like:
Some HTML
messagemethod()nextmessage
some more html
Do you have to escape the class operator????
Thanks in advance,
Spencer