I know I can make a new variable by simply saying $var = "stuff", but how would I make one like this:
<?php
$var = ?>
<html>
<head>
</head>
<body>
</body>
</html>
<? ; ?>
Do you see what I am getting at? Is there a way to create a variable without having to be restrictive and using = "";
Thanks for your help.
Sounds like a job for Heredoc
Note, that the end token (here
HTML;) must be on a line for itself without any leading or trailing whitespaces (except the newline at the end).Additional you can just put everything into a string like usual, but with newlines
Or add newline characters yourself
or