fputcsv(): undefined function?
Posted: Tue May 24, 2005 3:00 pm
I am trying to generate a CSV.
Using the example given on PHP.net: fputcsv() i get the following.
In the notes on php.net people have posted their own definition of the funtion. Is fputcsv() just (what i guess you call) a constructor?
I am using PHP 5.04.
php.net's example:
Using the example given on PHP.net: fputcsv() i get the following.
Code: Select all
Fatal error: Call to undefined function fputcsv()I am using PHP 5.04.
php.net's example:
Code: Select all
<?php
$list = array (
'aaa,bbb,ccc,dddd',
'123,456,789',
'"aaa","bbb"'
);
$fp = fopen('file.csv', 'w');
foreach ($list as $line) {
fputcsv($fp, split(',', $line));
}
fclose($fp);
?>