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

From: Date: Tue, 21 Oct 2003 23:41:06 +0000
Subject: Re: How do I get quotes around strings to display?
Groups: php.db 
Request: Send a blank email to php-db+get-31247@lists.php.net to get a copy of this message
$fieldarray = array("one","Two", "three", "four"); $line = "\"".implode("\",\"",$fieldarray) ."\""; this will print out "one","Two","three","four" hth jeff Karen Resplendo <karenresplendo@y To: php-db@lists.php.net ahoo.com> cc: Subject: [PHP-DB] How do I get quotes around strings to display? 10/21/2003 07:24 PM My ascii file coming in has quotes around each comma delimited item. After reading the rows into array these quotes are gone. Can't figure out how to put them back in the array items when displaying the fields. Rows are saved to table and bad rows are displayed in browser. Hope this fits this list: ////////////////////////////////////////// //now print out the fields in one row //don't print last comma in row of fields //////////////////////////////////////////// For ($c=0; $c < $fieldcount; $c++) { if ($c==10) { $displayrows.=$fieldarray[$c]; } Else { $displayrows.=$fieldarray[$c].","; } } //end of for loop --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search

« previous php.db (#31247) next »