joshaallen / WDV341-PHP-FUNCTIONS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unit-4 PHP Functions

8-1:PHP Functions

Create a PHP page that will process and display the following pieces of information. Use a combination of custom PHP functions and functions from the PHP API as needed.

Your page should do the following:

  1. Create a function that will accept a timestamp and format it into mm/dd/yyyy format.

  2. Create a function that will accept a timestamp and format it into dd/mm/yyyy format to use when working with international dates.

  3. Create a function that will accept a string input. It will do the following things to the string: * Display the number of characters in the string * Trim any leading or trailing whitespace * Display the string as all lowercase characters * Will display whether or not the string contains "DMACC" either upper or lowercase

  4. Create a function that will accept a number and display it as a formatted phone number. Use 1234567890 for your testing.

  5. Create a function that will accept a number and display it as US currency with a dollar sign. Use 123456 for your testing.

About


Languages

Language:PHP 86.5%Language:SCSS 13.5%