Table of Contents
In PHP, there are three types of arrays:
In this tutorial you will learn how to work with arrays, including:
<h4>Array_Items</h4>
<p></p>
<?php
// function example:
function myFunction()
{
echo "This text comes from a function";
}
// create array:
$myArr = array("Volvo", 15, ["apples", "bananas"], myFunction() );
// calling the function from the array item:
$myArr[3]();
?>
Result View Example
<h4>Array_Functions</h4>
<?php
$cars = array("Volvo", "BMW", "Toyota");
echo count($cars);
?>
Result View Example
Document in project
You can Download PDF file.