The date in the masthead

Exercise 2 of 6 in chapter 1 · 100 XP · 5 objectives checked by tests

Topics covered: VariableNumberConcatenationdate()

The gazette has a title, but Madame Lou is a stickler for tradition: every issue carries its issue number, today's date and its price. “Fifty cents, same as in 1987.”

Your mission

  1. Add a variable $numero (number) set to 42, an integer.
  2. Add a variable $prix (price) set to 0.5, a float.
  3. Below the slogan, print <p class="edition">Issue no. 42, October 29, 2026</p>, where the date is today's date, computed by the date() function with the format 'F j, Y' (full month name, day, four-digit year).
  4. Then print <p class="prix-du-numero">Price: €0.50</p>, formatting the price with number_format().

Reminder

PHP tells strings ('42', in quotes) apart from numbers (42, without quotes), which you can calculate with. The dot . concatenates, that is, glues pieces of text end to end. Functions like date() or number_format() take arguments in parentheses and return a result.