Hi
What can be wrong with the following codes?
I am getting PHP error in both these codes,Plz help me.
1)First One is this :-
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
$txtms=<<<endtext
This is an example of Here Document
this output will b displayed on any web browser
Bye Bye
endtext;
echo($txtms);
?>
</body>
</html>
2) Second one is this -
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
$author="Alfred E Norman";
echo<<<_END
This a headline
This is the 1st line.
This is second Line.
- Written by $author.
_END;
?>
</body>
</html>
I this 2nd case,the problem is I am getting the entire output in one line instead of the way I have given the output, i.e. there should be multiple lines instead of a single line.
Plz tell me what to do?