|
Posted by houghi on 07/09/07 06:57
petersprc wrote:
> To preserve negative numbers, you can replace these:
>
> $x = preg_replace('/[\+\-]/', '', $loc[1]);
> [...]
> $y = preg_replace('/[\+\-]/', '', $loc[2]);
>
> With:
>
> $x = str_replace('+', '', $loc[1]);
> [...]
> $y = str_replace('+', '', $loc[2]);
>
> I noticed the original example had stripped the negative sign.
Thanks. I would also like to mention you as the maker of the script. Is
there a site or a real name you would like to have attached to it, or is
it enough just to say 'This script is made by petersprc from
news:comp.lang.php'?
houghi
--
Personally, I think most sports fans are a little "gay". They'd
rather watch a bunch of sweaty guys jumping all over eachother,
than, say fashion TV - where hot models walk down the runway.
[Back to original message]
|