Hi there, I'm using php to try and take two separate arrays ($colors and $message), write them to a single multidimensional array ($endline), and then write the resulting md array into a csv. This works fine on my localhost, but for some reason it doesn't work through my web host.
Could this be a windows unix difference? I've had some minor problems with this before.
It also may be a problem with the way the webhost runs sessions. The $filename below is the previous session file from which I've gathered the $colors array. I just wanted to write over it for efficiency's sake.
Here's the key snippet. Is there any way I could recode to make it more workable?
foreach (range (0,9) as $r)
{
if ($colors[$r] != "")
{
$endline[$r] = array($colors[$r],$message[$r]);
}
}
$fp = fopen($filename, 'w');
foreach ($endline as $item)
{
fputcsv($fp, $item);
}
fclose($fp);