this foo() would give you an array of the month names.
so what is happening is :monthNames(5, 7)=Array( 5=>‘may’, 6=>‘june’, 7=>‘july’)
Arrays can’t be echoed.
If you wanted to echo them all in one statement, use implode(); ( or change the function to store the month in a string and not an array, tho I think you would find this would trully limit the functions versatility.
You could also do this:
foreach( monthNames($FromMonth, $ToMonth) as $month){ echo $month,‘<br>’; }
same way…
what script are you using to build your table? You will need to take into account how HTML tables work. but just for the sake of showing you how to output:
foreach( monthNames($FromMonth, $ToMonth) as $month){ echo ‘<td>’,$month,‘</td>’; }