my problem is, that I want to save an array into a CSV file. Here my code:
//Webseite auslesen
$string = file_get_contents("***Zensiert***");
$helper = preg_match_all('!<a.*?href=\"([^\"]*)\"[^>]*>(.*?)</a>!', $string, $matches);
$fl_array = preg_grep('/^http.*/', $matches[1]);
echo '<pre>';
print_r($fl_array);
echo '</pre>';
$fp = fopen('file.csv', 'a');
foreach ($fl_array as $fields) {
fputcsv($fp, $fields);
}
fclose($fp);
The file is generated, but without content?! I didn't see the mistake...
Hope you can help me.