Wagner-David wrote:
>> I have an variable of the following format
>>
>> $i = "buy 10/23/01 50 25.25 50 25.25"
>>
>> Now, I would like to multiply the 3 and 4th fields by a factor (say 2)
>> so I get the following
>>
>> $i = "buy 10/23/01 100 50.50 50 25.25"
>
> Here is one way:
>
> $i
-
From: Roy Peters [mailto:[EMAIL PROTECTED]]
Sent: Sunday, October 28, 2001 14:47
To: [EMAIL PROTECTED]
Subject: modifying strings that contains numbers
hi
I have an variable of the following format
$i = "buy 10/23/01 50 25.25 50 25.25"
Now, I would like to multiply the 3 and 4th
hi
I have an variable of the following format
$i = "buy 10/23/01 50 25.25 50 25.25"
Now, I would like to multiply the 3 and 4th fields by a factor (say 2)
so I get the following
$i = "buy 10/23/01 100 50.50 50 25.25"
How do I do this?
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]