Page 1 of 1

implode errors

Posted: Thu Aug 07, 2003 4:40 am
by Paul Oertel
I am having trouble with the implode function. I provides the right result but it is also spitting out an error.

I read a line from a file into $str using fgetcsv. I do some checks on the value of some of the elements of the $str array and then I put it back into a regular string.

This is the code I am using.

Code: Select all

$str = fgetcsv ($fp, 1000, ",");
			
$whole_string = implode(",", $str);
When I echo $whole_string it returns the proper value but I am also getting the following error each time.

Code: Select all

<b>Warning</b>:  implode() &#1111;<a href='http://www.php.net/function.implode'>function.implode</a>]: Bad
 arguments. in <b>C:\mimi\alerter.php</b> on line <b>83</b><br />
I would appreciate any help that I can get on this.

Paul

Re: implode errors

Posted: Thu Aug 07, 2003 5:02 am
by mesz
[quote="Paul Oertel"]

Code: Select all

$str = fgetcsv ($fp, 1000, ",");
			
$whole_string = implode(",", $str);
Try

Code: Select all

$whole_string = implode(",". $str);