Menu
Coddy logo textTech

Recap - Variable Init

Part of the Fundamentals section of Coddy's PHP journey — lesson 10 of 71.

challenge icon

Challenge

Easy

Write code that initializes the following variables:

  • k with the value 88 (note: lowercase 'k')
  • PI with the value 3.14 (note: uppercase 'PI')
  • name with the value “Sophie”.

Make sure you use the exact variable names and values. Remember:

  • PHP is case sensitive! (kK)
  • String values must be enclosed in quotes: "Sophie" not sophie

Try it yourself

<?php
# Type your code below

echo "k = $k\n";
echo "PI = $PI\n";
echo "name = $name\n";
?>

All lessons in Fundamentals