I'm curious to know how to echo an array outside a function, for instance, this code prints it within. but what if I just wanted to return the values and echo it outside?
function myArray() {
$arr = array('One', 'Two', 'Three', 'four');
for ($i = 0; $i < count($arr); $i++) {
echo $arr[$i];
}
}
myArray();
Hope that makes sense.