Re: Am stuck

From: Date: Thu, 25 Sep 2003 15:02:38 +0000
Subject: Re: Am stuck
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-163914@lists.php.net to get a copy of this message
On Thu, 25 Sep 2003 15:09:31 +0200 "Chris Grigor" <aphrodit@iafrica.com> wrote: > Good day all > > I have a txt file that has values from various strings written to > it. > > What Im looking for is the following > > $name = "Chris'; > > I need to do a count on $name so that it returns 5 letters. Then > before writing it to the output file I know that it has to be 40 > charecters long before it gets written. > > So I know its 5 now I need automatically add another 35 empty > spaces to it to make it 40 so that it makes the $name like this > > $name = "Chris "; <---- > if I do a count on this it should be 40 charecters long.... > > > Can anyone help out here??? > > Chris > I don't think you need to determine the length of $name. You just need to use str_pad(). -- Raquel ============================================================ People demand freedom of speech as a compensation for the freedom of thought which they seldom use. --Kierkegaard -- Raquel ============================================================ People demand freedom of speech as a compensation for the freedom of thought which they seldom use. --Kierkegaard

« previous php.general (#163914) next »