RE: [PHP-DB] How do I get quotes around strings to display?
| From: | Ford, Mike [LSS] | Date: | Wed, 22 Oct 2003 09:26:07 +0000 |
| Subject: | RE: [PHP-DB] How do I get quotes around strings to display? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-31258@lists.php.net to get a copy of this message | ||
On 22 October 2003 00:41, jeffrey_n_Dyke@Keane.com wrote:
> $fieldarray = array("one","Two", "three", "four");
> $line = "\"".implode("\",\"",$fieldarray)
> ."\"";
Eck, eck, eck!! Definitely a construct crying out for single quotes rather than double:
$line = '"'.implode('","',$fieldarray) .'"';
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211