Array issue
Posted: Sat Apr 04, 2009 4:54 am
Hi there,
Say I wanted to save every value of an array on a separate line starting on entry four, for multiple sources of data. The length of the array varies depending on where the data is grabbed from, so it can range anywhere from 10-100. Is there any way to do this?
Example ($matches is the array):
Thanks!
Say I wanted to save every value of an array on a separate line starting on entry four, for multiple sources of data. The length of the array varies depending on where the data is grabbed from, so it can range anywhere from 10-100. Is there any way to do this?
Example ($matches is the array):
Code: Select all
for ( $array_no=4; $array_no<=[color=#40BFFF]max array variable here?[/color]; $array_no=$array_no+1 )
{
$line = $matches[1][$array_no];
fwrite($file, $line."\n");
}