Page 1 of 1

need help, easy fix to code

Posted: Sat Jan 24, 2009 9:05 pm
by dman779
This is a string of code from a pretty intense script that I use. This code displays the user's revenue in a table along with other bits of information.

This is only one column of the table, the variable is "lead_amount" and I need to format that to display numerically. I usually use the number_format() code but it won't seem to work here properly. I might not be using the right syntax.

So basically I need to display "lead_amount" numerically. Can anyone help! Here is the code:

Code: Select all

$colNames[]="Your Revenue"; $format[]=$camp->createFormat(null, null,"lead_amount", null);

THANK YOU!

Re: need help, easy fix to code

Posted: Sat Jan 24, 2009 11:34 pm
by josh
I don't see the number_format() call in your code or a problem in your post I can answer

Re: need help, easy fix to code

Posted: Sun Jan 25, 2009 3:27 am
by dman779
the code that is there now is how it normally is, but i want to make it display numerically. I don't know the proper way to use the format_number call in this scenario. Can you show me the code formatted numerically please :)

Re: need help, easy fix to code

Posted: Sun Jan 25, 2009 3:41 am
by Mark Baker
dman779 wrote:the code that is there now is how it normally is, but i want to make it display numerically. I don't know the proper way to use the format_number call in this scenario. Can you show me the code formatted numerically please :)
Not really, you seem to be using some class instantiated as $camp to do the formatting. All you're showing us is the call to that class's createFormat() method. As we don't know what the class is, what it actually does, what parameters it expects, or anything about it, there's little we can advise

Re: need help, easy fix to code

Posted: Sun Jan 25, 2009 6:13 am
by josh
Eh if you dont know what you're doing you should probably read up on it more before you attempt the edit.