Category Code Snippets

PHP Format Numbers to Nearest Thousands

Here comes a PHP function to format numbers to nearest thousands such as Kilos, Millions, Billions, and Trillions with comma. Function function thousandsCurrencyFormat($num) { if( $num > 1000 ) { $x = round($num); $x_number_format = number_format($x); $x_array = explode(',', $x_number_format); $x_parts = array('k', 'm', 'b', 't'); $x_count_parts = count($x_array) - 1; $x_display = $x; $x_display = $x_array . ((int) $x_array !== 0 ? '.' . $x_array : ''); $x_display .= $x_parts; return .
How to Combine Javascript Files In WordPress without Plugin?

How to Combine Javascript Files In WordPress without Plugin?

To combine the javascript files in with and without Plugin, first, we must know all of the javascript files along with its handle name loaded on the web without seeing the web source as we did in the manual way. Knowing all of the javascript files loaded in a web page We can find all of information about the javascript files loaded in a WordPress page in the WP_Scripts object. This .