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" <[EMAIL PROTECTED]> wrote in message 001b01c2a1af$b9995e20$6401a8c0@p1">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 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php