Question
Add the following standard PHP script delimiters to the docu- ment body: Add the following statements to the script section. Th e fi rst statement
Add the following standard PHP script delimiters to the docu- ment body:
Add the following statements to the script section. Th e fi rst statement assigns an integer value to a variable named $SingleFamilyHome. Th e second statement then formats the value in the $SingleFamilyHome variable and assigns the
formatted number to the $SingleFamilyHome_Print vari- able. Th e number in the $SingleFamilyHome_Print variable
will include a comma that separates the thousands and will include two decimal places. Th e fi nal statement displays the formatted number on the screen. $SingleFamilyHome = 399500; $SingleFamilyHome_Display = number_format($SingleFamilyHome, 2); echo "
The current median price of a single family home in Pleasanton, CA is $$SingleFamilyHome_Display.
";Save the document as SingleFamilyHome.php in the
Projects folder for Chapter 1, upload the document to the server, and then validate it with the W3C XHTML Validator. After the document is valid, close it in your text editor, and then open it in your Web browser to see how it renders. You
should see the text Th e current median price of a single fam-
ily home in Pleasanton, CA is $399,500.00. displayed on the
screen.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started