Add comments to each section of PHP to describe the purpose of the code. Before
ID: 3541899 • Letter: A
Question
Add comments to each section of PHP to describe the purpose of the code.
Before each paragraph tag <p> that you print via PHP, add a TAB so that anyone viewing the source will see the <p> indented. You should put newline characters so that your source is neat on all assignments going forward.
Create a variable name myString. Assign the following two paragraphs to myString. Pay close attention to single and double quotes.
My children were pretending they work at the bank. My daughter said, "Pay up Mr. O'Doyle, or we will take all of your stuff, even your Mom's shoes." My son said "How much money do I owe you?
Explanation / Answer
<html>
<head>
<title>PHP Assignment Answer</title>
</head>
<body>
<?php
$myString="<p> My children were pretending they work at the bank. My daughter said, "Pay up Mr. O'Doyle, or we will take all of your stuff, even your Mom's shoes." My son said "How much money do I owe you?" to which my daughter replied "$1,000,000.52. I have told you many times that interest was building up. You always said 'I know, but I have to pay for my Mom's shoes first.' but now you must pay me or face the consequences."</p><p> My son replied "Sigh...women are always taking my money."</p>";
echo $myString;
?>
</body>
</html>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.