All posts by Rafasashi

10+ Solutions for Responsive Data Tables

Having trouble fitting your tables into a site? They look great on a desktop layout, but look miserable on mobile. The Basics First remove any fixed widths from your markup. Before: <table width="540"> <tr> <td width="300"> Header 1 < /td> <td width="60"> Header 2 < /td> <td> Header 3 < /td> <td> Header 4 < /td> < /tr> < /table> After: <table> <tr> <td> Header 1 < /td> <td> Header 2 < /td> .

PHP Format Numbers to Nearest Thousands

Here comes a function to to nearest thousands such as Kilos, Millions, Billions, and Trillions with comma. Function Output thousandsCurrencyFormat(3000); // 3k thousandsCurrencyFormat(35500); // 35.5k thousandsCurrencyFormat(905000); // 905k thousandsCurrencyFormat(5500000); // 5.5m thousandsCurrencyFormat(88800000); // 88.8m thousandsCurrencyFormat(745000000); // 745m thousandsCurrencyFormat(2000000000); // 2b thousandsCurrencyFormat(22200000000); // 22.2b thousandsCurrencyFormat(1000000000000); // 1t (1 .