In PHP functions, a function will be executed by a call to the function from anywhere within a page.
Consider this example:
<html>
<head>
</head>
<body>
<?php
function getInfo()
{
echo "Successfull";
}
echo "PHP Function Execution:";
getInfo();
?>
</body>
</html>
Here, After the statement is echoed "PHP Function Execution" the getInfo function is called and "Successfull" gets prints.
In PHP Arrays, multiple value will be stored in one variable.
There are 3 kinds of arrays: Numerical, Associative and Multidimensional.
A numeric array stores each array element with a numeric index.
An associative array, each ID key is associated with a value.
whereas,
In a multidimensional array, each element in the main array can also be an array. And each element in the sub-array can be an array, and so on.
Consider this example:
<html>
<head>
</head>
<body>
<?php
$employeeID = array("John"=>B32, "Harry"=>C30, "Kate"=>A34);
echo "Employee ID of Harry is:" . $employeeID['Harry'] ;
?>
</body>
</html>
Hope you got the idea of executing Functions and Arrays in PHP.