Services Work Learn About Contact
0/8
Lesson 3 of 8

Operators & Conditions

PHP uses standard arithmetic operators and comparison operators. Use if/elseif/else for branching. The concatenation operator is a dot ., not a plus.

PHP
<?php
$score = 85;

if ($score >= 90) {
  echo "A";
} elseif ($score >= 80) {
  echo "B";
} else {
  echo "C";
}

// String concatenation
$greeting = "Hello, " . $name;
?>
🧠

Quick Quiz

Answer correctly to unlock the next lesson.

Support the mission

This learning platform is 100% free: no ads, no tracking, no paywalls. If it helped you learn something useful, you can support future lessons or donate to Doctors Without Borders, which provides emergency medical care in crisis zones worldwide.

🎉

You completed PHP!

You finished all 8 lessons and quizzes. You now know the basics of PHP.