Note Submitter: Free Jedi
Reason: already in docs
----
When coding it is convenient to think of structure like
this:
? > something < ? php
as almost fully equivalent of
echo "something";
i.e. you can replace one with another in functions, blocks
and everywhere.
For example, the following code:
<?php
function foo() {
?> Foo is called. <?php
}
function boo() {
?> Boo is called. <?php
}
if (1) foo();
else boo();
boo();
foo();
?>
gives the same result as:
<?php
function foo() {
echo "Foo is called. ";
}
function boo() {
echo "Boo is called. ";
}
if (1) foo();
else boo();
boo();
foo();
?>
the output in both cases is "Foo is called. Boo is
called. Foo is called. "
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|