s1eepercat
12/5/2019 - 1:28 PM

PHP BASICS

//STRINGS -------------------

$string . $string = concats strings

escapeing a character in a string is: \a

//ARRAYS -----------------------
$array = array("lalal") or $array = ["llalaa"];

var_dump arrays

$arrays = [1 => "lalalal", "two" => "ararar"];

//FOR EACH -------------------------

foreach ($array as $item) {
  echo $item;
}

foreach ($array as $key => $value) {
  echo $key;
  echo $value;
}

//MIXIN PHP and HTML --------------------

<?php echo $name; ?> is the same as <?= $name; ?>