List:General Discussion« Previous MessageNext Message »
From:Jasper Bryant-Greene Date:September 13 2005 9:14pm
Subject:Re: Newbie MySQL/PHP question re output formatting
View as plain text  
Nuno Pereira wrote:
> To do date change the first line from
> 
> printf("<tr><td> number_format({$thearray[cost]}, 2) </td>
> 
> to
> 
> printf("<tr><td> ".number_format({$thearray[cost]}, 2)." </td>

I think you mean:

print( "<tr><td>" . number_format( $thearray['cost'], 2 ) . "</td>" );

As stated by a previous poster to this thread, you shouldn't rely on 
PHP's automagical conversion of nonexistent constants to strings. The 
extra curly braces { } would also likely cause an error in the function 
params, and are extraneous even if they don't.

-- 
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

Thread
Newbie MySQL/PHP question re output formattingBill Whitacre13 Sep
  • Re: Newbie MySQL/PHP question re output formattingJigal van Hemert13 Sep
  • Re: Newbie MySQL/PHP question re output formattingNuno Pereira13 Sep
    • Re: Newbie MySQL/PHP question re output formattingJasper Bryant-Greene13 Sep