your not using the same variables in your function compared to the rest of your script
your function is looking for $name and $age your giving it $name_array and $age_array
and secondly your not loading the array correctly
u want $name[0] not $name, as this doesnt tell php the part of the array you want to load
<?
function generate($name, $age) {
for($i=0;$i<4;$i++ ) {
echo $name[$i];
echo "<BR>";
echo $age[$i];
echo "<BR>";
echo "---------<BR>";
}
}
$name = array ('me','myself','and','Irene');
$age = array ('23','23','23','21');
generate($name, $age);
?>