This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function format_value( value ) | |
| { | |
| var _value = value.toString(); | |
| var _decimal = '00'; | |
| if (_value.indexOf( '.' ) != -1 ) | |
| { | |
| // the given value is float | |
| var temp = _value.split( '.' ); | |
| _value = temp[ 0 ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function format_value( $value ) | |
| { | |
| $value = (string) $value; | |
| if (strpos( $value, '.') !== FALSE) | |
| { | |
| list( $int_val, $decimal ) = explode( '.', $value ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| functions say( str, callback_fn ) | |
| { | |
| // in the function "say", | |
| // we call the callBack and parse the param "str", that is in the scope of "say" | |
| callback_fn( str ); | |
| } | |
NewerOlder