need help, easy fix to code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dman779
Forum Newbie
Posts: 6
Joined: Wed Jan 21, 2009 6:47 pm

need help, easy fix to code

Post 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!
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: need help, easy fix to code

Post by josh »

I don't see the number_format() call in your code or a problem in your post I can answer
dman779
Forum Newbie
Posts: 6
Joined: Wed Jan 21, 2009 6:47 pm

Re: need help, easy fix to code

Post 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 :)
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: need help, easy fix to code

Post 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
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: need help, easy fix to code

Post by josh »

Eh if you dont know what you're doing you should probably read up on it more before you attempt the edit.
Post Reply