I have been toying with the idea of posting a thread asking for your dumbest mistakes so that we may all learn from each other.
"A smart man learns from his own mistakes,
A wise man learns from others' mistakes"
I think I will start us off. I haven't had too many that were really bad, but... (6 Replies)
Well I have a new hosting account. I love these guys, because they have everything I need, and give me everything I need, but at the cost of I must configure it myself. I am trying to create a subdomain, and they use raw zone access for dns administration. I have no idea how to configure the zone... (1 Reply)
I wanted to know what email app most Sun solaris / unix gurus use ? I have become quite NON microsoft in the last few months in my studying solaris..
thanks
simon2000 (6 Replies)
Please forgive me if this is the wrong place for this post. I didn't see a good place to post this topic in. :D
I would like to know what's the most popular and reliable Java IDE out there nowadays? A FREE one would be awesome! :D
Thanks for your suggestion!
Cheers! (10 Replies)
perl guru's,
what i think is, not simply writing a script...i like to write a script which must take less time to run and less memory use..i like to fine tune my program...
for ex, my program has a subroutine(1 file open &file close and 1print )
2if loops(1 file open &file close and... (2 Replies)
Hi alls
I don't see any solution and I need to have feedback from other people...
On a test machine (AIX 5.1) I've installed OpenSSH software on it (with openssl, prng, etc...) like is described on IBM AIX Docs. To control the installation I've rebooted the machine and all was ok (CDE was... (15 Replies)
Good Day,
Im new to scripting especially awk and sed. I just would like to ask help from you guys about a sed command that prints the line immediately after a regexp, but not the line containing the regexp.
sed -n '/regexp/{n;p;}' filename
What if my regexp is 3 word or a sentence. Im... (3 Replies)
hello,
i'm recompiling some c++ code for OSX and there are some bugs as the configure is not picking up some libs like atlas, pastix, etc, it should be finding either in standard path or with pkgconfig but it's not so i'm rewriting the Makefile. C++ territory is a bit of a stretch with all of... (0 Replies)
Discussion started by: f77hack
0 Replies
LEARN ABOUT PHP
splfileobject.fputcsv
SPLFILEOBJECT.FPUTCSV(3) 1 SPLFILEOBJECT.FPUTCSV(3)SplFileObject::fputcsv - Write a field array as a CSV line
SYNOPSIS
public int SplFileObject::fputcsv (array $fields, [string $delimiter = ","], [string $enclosure = '"'], [string $escape = "
DESCRIPTION
Writes the $fields array to the file as a CSV line.
PARAMETERS
o $fields
- An array of values.
o $delimiter
- The optional $delimiter parameter sets the field delimiter (one character only).
o $enclosure
- The optional $enclosure parameter sets the field enclosure (one character only).
o $escape
- The optional $escape parameter sets the escape character (one character only).
RETURN VALUES
Returns the length of the written string or FALSE on failure.
Returns FALSE, and does not write the CSV line to the file, if the $delimiter or $enclosure parameter is not a single character.
ERRORS /EXCEPTIONS
An E_WARNING level error is issued if the $delimiter or $enclosure parameter is not a single character.
CHANGELOG
+--------------+-------------------------------+
| Version | |
| | |
| | Description |
| | |
+--------------+-------------------------------+
|5.5.21, 5.6.5 | |
| | |
| | Added the $escape parameter. |
| | |
+--------------+-------------------------------+
EXAMPLES
Example #1
SplFileObject::fputcsv example
<?php
$list = array (
array('aaa', 'bbb', 'ccc', 'dddd'),
array('123', '456', '789'),
array('"aaa"', '"bbb"')
);
$file = new SplFileObject('file.csv', 'w');
foreach ($list as $fields) {
$file->fputcsv($fields);
}
?>
The above example will write the following to file.csv:
aaa,bbb,ccc,dddd
123,456,789
"""aaa""","""bbb"""
SEE ALSO fputcsv(3), SplFileObject::fgetcsv.
PHP Documentation Group SPLFILEOBJECT.FPUTCSV(3)