Mixing html and php is simple:
<? while($row): ?>
<p><?=$row['name'] ?></p>
<?php endwhile; ?>
But how could i store html like this into a php variable? (Purposed syntax, but doesn’t work)
<? $html = ?>
<p>My HTML!!</p>
<? ; ?>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is how:
That is know as php heredoc
Note: You should place closing heredoc keyword without any spaces or indentation.