in a code such as:
Isnt this the same as doing:PHP Code:echo <<<END_OF_ECHO
echo contents, like html or what not.
END_OF_ECHO;
But maybe a bit more readable?PHP Code:echo "
Echo contents, like html
";
Printable View
in a code such as:
Isnt this the same as doing:PHP Code:echo <<<END_OF_ECHO
echo contents, like html or what not.
END_OF_ECHO;
But maybe a bit more readable?PHP Code:echo "
Echo contents, like html
";
ye it's quite same, can use both and few other versions
echo ($variable);
echo $variable;
echo 'text';
echo ("text");
print $variable
print "text";
print ("text");
....
Thanks.
For the most part thats what i was thinking, this will make it simpler and more readable for HTML forms and stuff in the PHP, because i can just do:
PHP Code:echo <<<HTM
<form method='post' action='submit.php'>
<input type="text" id='$id'>
</form>
HTM;
Rather than something like:
Anyway, thanks for the fast reply :)PHP Code:?>
<form method='post' action='submit.php'>
<input type="text" id='<?php echo $id; ?>'>
</form>
<?php
Recoding my website atm, making it more readable and optimized.
In that case, use smarty. Smarty : Template Engine
Instead ofI doCode:<php here> echo blaat <php here>
Code:<php handles page, gives variables, calls template>
In the end it'll make your pages a LOT more readable :)Code:Template, uses HTML, has all variables from PHP like {$this}