$formattedquote=sprintf("%.2f", $thequote);
See: http://www.php.net/manual/en/function.sprintf.php
Gurhan
-Original Message-
From: Kim Kohen [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 12, 2002 9:59 PM
To: PHP
Subject: [PHP-DB] Word Count, rounding and missing zeros
G
G'day All,
I'm using php to query a mysql db and I need to display a word count from
one of the columns and multiply it to get a quote.
So far I have this:
$thewords = count(split (" ","$adtext"));
$thequote = round(($thewords * .78),2);
In an example with 35 words it returns 27.3 but I'd like