Lesson 2.2: Data Types
📖 Introduction to PHP
⏱️ 25 min
PHP supports different data types: String, Integer, Float, Boolean, Array, Object.
String:
<?php
$name = "John Doe";
$greeting = 'Hello';
?>
Integer:
<?php
$age = 25;
$count = 100;
?>
Float:
<?php
$price = 19.99;
$temperature = -5.5;
?>
Boolean:
<?php
$isActive = true;
$isAdmin = false;
?>
✓ Free Lesson
This lesson is completely free. No enrollment required. Continue learning!