RE: How do I get quotes around strings to display?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux