printf NEW      ("%-193.193s");

printf ("%-193.193s",<VARIABLE>);

HTH

> -----Original Message-----
> From: Jerry Verhoef (UGBI) [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 08, 2002 4:35 PM
> To: 'Scott'; Jerry Verhoef (UGBI)
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Stripping the first line of a file
> 
> 
> Yes there is!
> 
> Try reading the manual?
> http://www.php.net/printf
> 
> printf ("%-5.5s",$fields[14]);
> 
> for the other function to make a line exactly 255 char long? 
> Do you have the
> perl Example?
> 
> HTH
> Jerry
> > -----Original Message-----
> > From: Scott [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 08, 2002 4:22 PM
> > To: Jerry Verhoef (UGBI)
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [PHP] Stripping the first line of a file
> > 
> > 
> > Thank you!  Works.  I have a few more questions!  I am working on 
> > converting a program from perl to PHP as it is the new 
> > language of choice
> > at our office.
> > 
> > I have been using printf statements in perl to format data.  
> > Is there a 
> > similar funtion in php?  Here is an example from the perl program:
> > 
> > printf NEW  ("%-5.5s",$fields[14]);
> > 
> > This will print exactly 5 characters, I also use this format 
> > to make sure
> > the lines are exactly 255 characters long:
> > 
> > printf NEW  ("%-193.193s");
> > 
> > Is there something similar in php.  Thanks for everyone's help and 
> > patience.
> > 
> > -Scott
> > 
> > 
> > 
> > 
> > 
> > 
> > On Fri, 8 Feb 2002, Jerry Verhoef (UGBI) wrote:
> > > $aFile=file(<FILENAME>);
> > > 
> > > //$aFile[0] contains the unwanted line
> > > echo $aFile[1]; // displays line 2
> > > echo $aFile[n]; // displays line n where n is an positieve 
> > interger and not
> > > greater then the number of lines in the file
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 
> The information contained in this email is confidential and
> may be legally privileged. It is intended solely for the 
> addressee. Access to this email by anyone else is 
> unauthorized. If you are not the intended recipient, any 
> form of disclosure, production, distribution or any action 
> taken or refrained from in reliance on it, is prohibited and 
> may be unlawful. Please notify the sender immediately.
> 
> The content of the email is not legally binding unless 
> confirmed by letter bearing two authorized signatures.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

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

Reply via email to