Req #64183 [Opn]: Why no str_PUTcsv()?
| From: | cmb@php.net | Date: | Wed, 27 Sep 2017 14:11:53 +0000 |
| Subject: | Req #64183 [Opn]: Why no str_PUTcsv()? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211388@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64183&edit=1
ID: 64183
Updated by: cmb@php.net
Reported by: cstdenis at ctgameinfo dot com
Summary: Why no str_PUTcsv()?
Status: Open
Type: Feature/Change Request
Package: Strings related
Operating System: n/a
PHP Version: 5.4.11
Block user comment: N
Private report: N
New Comment:
function str_putcsv(
array $fields,
string $delimiter = ',',
string $enclosure = '"',
string $escape_char = '\\'
) {
$stream = fopen('php://memory', 'w+');
fputcsv($stream, $fields, $delimiter, $enclosure, $escape_char);
rewind($stream);
return stream_get_contents($stream);
}
Previous Comments:
------------------------------------------------------------------------
[2013-02-13 22:17:19] sunseb at live dot com
Yes, the PHP language need this feature ! :-)
------------------------------------------------------------------------
[2013-02-10 12:37:04] cstdenis at ctgameinfo dot com
Description:
------------
There is a fgetcsv(), fputcsv(), str_getcsv(), but str_putcsv() is missing.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64183&edit=1