On Sat, 17 May 2008 15:07:35 +0200, Thomas Mlynarczyk
<th****@mlynarczyk-webdesign.dewrote:
Thomas Mlynarczyk schrieb:
>Alternatives:
<?php o($variable) ?>
with function o ( $variable ) { echo $variable; } or
<?php $view->variable ?>
with function __get ( $what ) { echo $this->$what; }
Another possible solution might be the heredoc syntax:
echo <<< EOT
<body>
<h1>$title</h1>
<p>$text</p>
</body>
EOT;
That last one is something I definitly use often for smaller sites,
however, your first solution seems quite useless as a simple echo would
suffice as well. Defining obscure functions just to save typing 5
characters every coder knows and understands does not only souns useless
to me, as far as I am concerned I consider this very bad practise.
--
Rik Wasmus
....spamrun finished