Posted by Cruella DeVille on 03/09/06 21:20
Let us say I have lots of html-code I want to print.... surrounded by
php code. I learned once that I could do like this:
<?php
$name = empty($_POST['name'] ? "" : $_POST['name'];
print
<<<HTML
<form method="post" action="">
Name: <input type="text" name="name" value="{$name}">
<input type="submit" name="submit" value="Press me">
</form>
HTML;
//and the rest of my php code.
Now my server is complaining about this. Is this wrong syntax? I've
tried to replace <<<HTML HTML; with <<<END END; but it doesn't make a
difference. Is it a special "code" word I've missed or is it
indifferend wethere I use <<<HTML or <<<END?
Navigation:
[Reply to this message]
|