You are here: Re: Commas in Results « All PHP « IT news, forums, messages
Re: Commas in Results

Posted by Fred Atkinson on 03/24/07 14:37

On Sat, 24 Mar 2007 10:27:44 -0400, Fred Atkinson
<fatkinson@mishmash.com> wrote:

> I am using the following script to display the number of
>entries in a file:
>
><?PHP
> echo count(file('filename.dat'));
>?>
>
> The current tally is in the 2500 range.
>
> Is there any way to format it so that the comma is inserted
>into the number (2,500) when the echo command sends it to the page?
>
> Regards,
>
>
>
> Fred

Disregard. I did some searching on the Internet. I came up
with this:

<?PHP
echo number_format(count(file('filename.dat')));
?>

It works fine.



Fred

 

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

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