On Thu, 15 Mar 2012 12:09:53 -0500, Jay Blanchard
jay.blanch...@sigmaphinothing.org sent:
I thought that fgetcsv returned an array. I can work with it like an
array but I get the following warning when using it
|Warning: implode(): Invalid arguments passed on line 155
154
Tamara Temple wrote:
On Thu, 15 Mar 2012 12:09:53 -0500, Jay Blanchard
jay.blanch...@sigmaphinothing.org sent:
I thought that fgetcsv returned an array. I can work with it like an
array but I get the following warning when using it
|Warning: implode(): Invalid arguments passed on line 155
[snip]
Not sure why, but ok. Thanks everyone!
An empty line would lead to $csvCurrentLine == array() which as a boolean would
be false but would not necessarily mean EOF. By using === to check the value
the expression will only evaluate to false at EOF or an error.
-Stuart
[/snip]
Makes
I thought that fgetcsv returned an array. I can work with it like an
array but I get the following warning when using it
|Warning: implode(): Invalid arguments passed on line 155
154 $csvCurrentLine = fgetcsv($csvFile, 4096, ',');
155 $currentLine = implode(,, $csvCurrentLine);
|
On Thu, Mar 15, 2012 at 6:09 PM, Jay Blanchard
jay.blanch...@sigmaphinothing.org wrote:
I thought that fgetcsv returned an array. I can work with it like an array
but I get the following warning when using it
|Warning: implode(): Invalid arguments passed on line 155
154 $csvCurrentLine
On 3/15/2012 12:23 PM, Matijn Woudt wrote:
On Thu, Mar 15, 2012 at 6:09 PM, Jay Blanchard
jay.blanch...@sigmaphinothing.org wrote:
I thought that fgetcsv returned an array. I can work with it like an array
but I get the following warning when using it
|Warning: implode(): Invalid arguments
On 03/15/2012 10:09 AM, Jay Blanchard wrote:
I thought that fgetcsv returned an array. I can work with it like an
array but I get the following warning when using it
|Warning: implode(): Invalid arguments passed on line 155
154 $csvCurrentLine = fgetcsv($csvFile, 4096, ',');
155 $currentLine =
On Thu, Mar 15, 2012 at 1:29 PM, Jay Blanchard
jay.blanch...@sigmaphinothing.org wrote:
On 3/15/2012 12:23 PM, Matijn Woudt wrote:
On Thu, Mar 15, 2012 at 6:09 PM, Jay Blanchard
jay.blanch...@sigmaphinothing.org wrote:
I thought that fgetcsv returned an array. I can work with it like an
Jay Blanchard wrote:
154 $csvCurrentLine = fgetcsv($csvFile, 4096, ',');
155 $currentLine = implode(,, $csvCurrentLine);
I am using it in a loop. End Of File is an error?
You certainly need to break out on $csvCurrentLine = false which indicates end
of file at least.
My own
On Thu, Mar 15, 2012 at 6:40 PM, Andrew Ballard aball...@gmail.com wrote:
On Thu, Mar 15, 2012 at 1:29 PM, Jay Blanchard
jay.blanch...@sigmaphinothing.org wrote:
On 3/15/2012 12:23 PM, Matijn Woudt wrote:
On Thu, Mar 15, 2012 at 6:09 PM, Jay Blanchard
jay.blanch...@sigmaphinothing.org
[snip]
Please, don't do that. Use this instead:
while (($csvCurrentLine = fgetcsv($csvFile, 4096, ',')) !== FALSE) {
}
[/snip]
Not sure why, but ok. Thanks everyone!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 15 Mar 2012, at 20:26, Jay Blanchard wrote:
[snip]
Please, don't do that. Use this instead:
while (($csvCurrentLine = fgetcsv($csvFile, 4096, ',')) !== FALSE) {
}
[/snip]
Not sure why, but ok. Thanks everyone!
An empty line would lead to $csvCurrentLine == array() which as a boolean
12 matches
Mail list logo