You are here: not displaying null data when using number_format « All PHP « IT news, forums, messages
not displaying null data when using number_format

Posted by linda on 11/01/06 09:40

Hi all,

I'm back with another question that I can't find any answers for, so I'm
hoping you guys can point me in the right direction again.

In the price colum of the product tables I have set to decimal 6,2, I then
use

$n = ($row['price']) ;
number_format ($n, 2);

for displaying the correct money format on the page.

As some of the products have the need for "Please call for price", to be
added to the description, thus leaving the price field empty, I have set it
to null.

But because I'm using number_format I still get 0.00 displayed on the page.
Could some one be so kind to explain how I might get around this, or know of
a link to a site that explains this. Would an if statement be the solution?
At the moment I've had to use css diplay: none; to get around it. But I'd
prefer not to have it there full stop.

Many thanks in advance, and best wishes
Linda

 

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

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