WDV341 - Intro PHP

4-1: Basic Functions

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

What is tomorrows date: 06/24/2025

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

What is tomorrows date: 24/06/2025

3. Create a function that will accept a string input. It will do the following things to the string:

    A. Display the number of characters in the string
    B. Trim any leading or trailing whitespace
    C. Display the string as all lowercase characters
    D. Will display whether or not the string contains "DMACC" either upper or lowercase

Number of Characters: 24
No Whitespace: I go to school at DMACC!
lowercase characters: i go to school at dmacc!
Word Found!

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

The formatted number is 234-567-890.

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

$123,456.00