[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

PHP fwrite Question

Asked by mouimet in PHP Scripting Language, PHP for Windows, OpenLaszlo

Tags: php tab fwrite

I have a tab file I am trying to write however some of the fields are occasionally blank. The tabs work fine if I print to the screen but fwrite is treating it as empty. I am trying to make the header count match the field count so I need the tabs even if the field is empty.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Partial code:
 
$test1= "test";
$test2= "";
$test3 = "";
 
$upload_file = fopen($cwd.$tmp_filename, "w");
$file_contents=$test1."\t".$test2."\t".$test3;
fwrite($upload_file, $file_contents);
fclose($upload_file);
 
print_r($file_contents);
[+][-]03/13/09 02:05 PM, ID: 23883534Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/06/09 04:37 PM, ID: 24321020Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/19/09 11:51 PM, ID: 25868254Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625