WDV341 Intro PHP

PHP Functions

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

05/05/2024

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

05/05/24

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

Number of characters in string: 10

String with no whitespace: LOVE dmacc

String to lowercase: love dmacc

This string contains DMACC

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

1,234,567,890

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

$123,456.00