Basic

// single qoutes vs double qoutes
// Strings in double qoutes will processed by php before being outputted.
// single qoutes are more effiecent

// dot . is concatination operator
echo 'Hello', . $name.  '!';
// use escape character like back slash \ to print single qoutes inside single qoutes stings.
echo 'Welcome to Joe\'s Website';
/* most used escape characters
\n for new line
\\ for backslash
\$ for a dollar sign
\t for tab
*/

<?php
echo 'hello world';

// comments

/*
comments
*/
?>

$age = 34;

$double_age = $age * 2;

// constants are case sensitive
//define is a function or keyword, VERSION is the constant name and after comma is its value
define('VERSION', 1.1);
echo VERSION;
//Look at
// Predefined variables/reserved variables
// Predefined constants/reserved constants
// we don't declare datatype in php most of the time or week typed language
// integers, floats, characters, strings, booleans, arrays/collections/sets
// capital 'A' and 'a' are different in php
// arrays are great for complex data sets.
// indexable arrays,
$colors = array('red', 'green', 'blue');
print_r($colors);
echo $colors[1];
$colors[] = 'yellow';

// associative arrays (which use strings as keys)
$home_towns = array(
    'Ahmad' => 'Lahore, Karachi, Madina',
    'Ali' => 'Chiniot, Lahore, London',
);

// pre tags are for makeing the output pretty
echo '<pre>';
print_r($home_towns);
echo '<pre>';

echo '<p>' . $home_towns['Ahmad'] . '</p>';
// Multidimensional Arrays (An Array of arrays)

echo '<p>' . $brothers['Ali']['Number'] . '</p>'

Next