<?php
function square($n)
{
// Check if the item is a number
if(is_numeric($n))
$n = ($n * $n); // Yes, square it
else
$n = "Not a number"; // No, replace with this
}
// Initialize the array
$array = array(0, 48, 22, 90, 44, 9, 222, 'Iamzheasshole', 101);
// Walk through the array, called the square function for every item
array_walk($array, 'square');
// Output the array
print_r($array);