Deck of Cards

Objective

For this assignment, you will be practicing creating HTML using PHP array and loops by generating and displaying a standard deck of cards on the page.

Requirements

Complete the following tasks:

  1. Convert the index.html file to be a PHP file.
  2. Using arrays, loops, and the files provided, complete the tasks below.
    1. Generate all 52 cards of a deck.
    2. Use the rand() function to generate 52 random cards

Example

You can find a completed version of the assignment below:

https://deck-of-cards.eisenbraun.ca

Solution