i am using this php code:
<?php
class NumericHelper {
public static function ToWordFa($number) {
...
...
...
?>
and i have $creditPoints
which it is echoing some numbers: i want to echo it as words and i do not know haw to do that. how to do that?
In your example ToWordFa
is defined as a static method in the class NumericHelper
. To use it you must call it like this:
echo NumericHelper::ToWordFa($creditPoints);
If you are calling ToWordFa() function outside of class Numeric Helper, you should use:-
$blah = new NumericHelper();
echo $blah->ToWordFa(2);