> The issue  here is that say I have a number -20.00 (length 
> 6). Now I have to split this number into two numbers using a split ratio 
> say 0.1.
> 
> So now I have two numbers to print -2.00 and -20.00. Now both 
> these numbers should be printed in six charcters i.e  s-2.00 and 
> -20.00 (s denotes  a whitespace charcater).

Gufran,

In that case you were close. This will work:

    $length = scalar( split( //, $number[$i] ) );

Since split() returns an array, and any array passed to scalar() returns it's length, 
this should be what you want.

--------------------------
David Olbersen 
iGuard Engineer
11415 West Bernardo Court 
San Diego, CA 92127 
1-858-676-2277 x2152

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to