You are here: Re: Processing and adding numbers from lines. « PHP Programming Language « IT news, forums, messages
Re: Processing and adding numbers from lines.

Posted by NC on 10/07/27 11:36

sanfranc415@gmail.com wrote:
>
> Is there an easy way to automate the processing of adding the following
> numbers in two lines?
>
> test test test description (100-10-0, 6700 test)
> test test test description (100-10-0, 6350 test)

Yes. You can get all numbers out of the string using regular
expressions or a simple explode()...

> I'd like to be able run a script on the file above to produce the
> following results.
>
> 200-20 .9090

How do you arrive at .9090?

Cheers,
NC

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация