RE: [PHP-DB] How do I get quotes around strings to display?

2003-10-22 Thread Ford, Mike [LSS]
On 22 October 2003 00:41, [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
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



[PHP-DB] How do I get quotes around strings to display?

2003-10-21 Thread Karen Resplendo
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

Re: [PHP-DB] How do I get quotes around strings to display?

2003-10-21 Thread jeffrey_n_Dyke

$fieldarray = array(one,Two, three, four);
$line = \.implode(\,\,$fieldarray) .\;
 this will print out one,Two,three,four

hth
jeff


   

  Karen Resplendo  

  [EMAIL PROTECTED]To:   [EMAIL PROTECTED]
  
  ahoo.comcc: 

   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

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