Advertisement

04.29.2008 at 11:49AM PDT, ID: 23363153
[x]
Attachment Details

Php - Formatting woe.

Asked by cobbja in PHP Scripting Language

I am trying to write 80 character per line.  But if I have spaces it doesn't write 80.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
while (strlen($onumber) < 3) {
                  $onumber = '0'.$onumber;
             }
 
         while (strlen($desc1) < 35) {
                  $desc1 = $desc1." ";
             }
 
         while (strlen($desc2) < 35) {
                  $desc2 = $desc2." ";
             }
 
         $space=" ";			 
          
// *****************************  write  record 1   here ************************
          
 
         $record1="D813".$type.$onumber.$desc1.$desc2."  ";
         $record1=$record1."\n";
         $fp=fwrite($invfile,$record1);
[+][-]04.29.2008 at 11:50AM PDT, ID: 21464943

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]04.29.2008 at 11:55AM PDT, ID: 21464982

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]04.29.2008 at 11:55AM PDT, ID: 21464984

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP Scripting Language
Sign Up Now!
Solution Provided By: Roonaan
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.29.2008 at 11:59AM PDT, ID: 21465016

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628