Question
PHP Exercise 1-3 You use the number_format() function when you want to format the appearance of a number. The number_format() function adds commas that separate
PHP Exercise 1-3
You use the number_format() function when you want to format the appearance of a number. The number_format() function adds commas that separate thousands and determines the number of decimal places to display. You can pass two arguments to the number_format() function: The first argument represents the literal number or variable you want to format, and the second argument determines the number of decimal places to display. If you exclude the second argument, the number is formatted without decimal places.
- Create a new html document in your text editor.
- Be sure to include all the appropriate html tags for a basic document. Add id comments at the top containing: your name, the date, and the words PHP Exercise 1-3
- Add the PHP script delimiters to the document body.
- Add the following statements to the script section: $SingleFamilyHome = 39950; $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 PHPEx1 folder. In order to test this file, you will need to upload it to your development server. Add it to the ClassEx folder.
The current median price of a single family home in Pleasanton, CA is $$SingleFamilyHome. Display
"; 5. Save the document as SingleFamilyHome.php in the PHPEx1 folder. In order to test this file, you will need to upload it to your development server. Add it to the Classex folderStep 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