I'm a bit of a newbie myself, but you've put $int as the parameter of the function and then tried to return it, but $int isn't used in the function at all. I think you're getting confused with ereg routines where the results are stored in a user-named array. Whatever, I think your function should look like this:
function get_month_abr($months) {
$months = array ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
for ($i=0; $i<12; $i++) {
echo $months[$i];
}
return;
}
//call function
$i=5 //just for example
echo get_month_abr($months);
There may be a syntax/logic error in this - I can't try it out on this computer - but you can't use $int as the parameter and then not use it in the function, otherwise it's undefined.
The experts out there will be able to give you more details.
Best of luck
Norman