Function to return clean 'currency' value.
#3

PHP код:
FormatNumber(numberprefix[] = "$")
{
    static 
value[32], length;

    
format(valuesizeof(value), "%d", (number 0) ? (-number) : (number));

    if((
length strlen(value)) > 3)
    {
        for(new 
length0; -->= 0++)
        {
            if ((
0) && (== 0)) strins(value","1);
        }
    }
    if(
prefix[0] != 0strins(valueprefix0);
    if(
number 0strins(value"-"0);
    return 
value;

I'm using this one, found it onto the forum a while ago, though I don't know who made it, or which topic it came from.
Reply


Messages In This Thread
Function to return clean 'currency' value. - by Josh_Lotus - 10.01.2016, 00:27
Re: Function to return clean 'currency' value. - by Kqly - 10.01.2016, 01:08
Re: Function to return clean 'currency' value. - by itsCody - 10.01.2016, 01:22

Forum Jump:


Users browsing this thread: 1 Guest(s)