Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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.

  1. Create a new html document in your text editor.
  2. 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
  3. Add the PHP script delimiters to the document body.
  4. 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.

    ;
  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 folder.
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 formatl) 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. 1. Create a new html document in your text editor. 2. 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 3. Add the PHP script delimiters to the document body. 4. Add the following statements to the script section: $Single Family Home = 39950; $Single FamilyHome. Display = number format($Single FamilyHeme, 2); echo "

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 folder

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions