Re: Displaying output from MySQL

From: Date: Wed, 11 Dec 2002 22:02:03 +0000
Subject: Re: Displaying output from MySQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127915@lists.php.net to get a copy of this message
Add 0 <? $nums = array("70.00", "65.50", "33.75", "-1", "-1.00", "-1.05"); foreach ($nums as $n) { print ($n) ." -- ". ($n + 0) ."\n"; } ?> -- Scott Hurring Systems Programmer EAC Corporation scott (*) eac.com -- "Beauford.2002" <beauford.2002@rogers.com> wrote in message news:001b01c2a1af$b9995e20$6401a8c0@p1... > Hi, > > Not sure if this is a PHP of a MySQL question, so I am sending it to both > groups. Basically I have a list of numbers with two decimal places in the > MySQL database, but I only want to display some of them with the decimal > points. > > i.e. > > 70 (not 70.00) > 87 > 51.5 > 46.75 > 12 > 29 > 5.5 > -1 > 45 > > I know it's probably a weird request, but any thoughts on how one would do > this. > > TIA > >

« previous php.general (#127915) next »