PHP Code:
stock ExplodeStr( output[][], max_len, input[], delimiter )
{
new nIdx = 0, nLen = (1 + copyc( output[nIdx], max_len, input, delimiter ))
while( nLen < strlen(input) )
nLen += (1 + copyc( output[++nIdx], max_len, input[nLen], delimiter ))
return
}
-Then just make an output variable like numbers[2][10]
-Make the number to a string and put it in input and set max_len to the length of the number
- Set delimiter to '.'
It should look similar to this:
Code:
ExploadeStr(numbers,9,numbertoseparate,'.')
The string will be separated into two parts, the number before the decimal and the number after the decimal.
numbers[0] contains the numbers before the decimal
numbers[1] contains the numbers after the decimal
Then you can just convert the string back to a number if you need to.
__________________