1
1
mirror of https://github.com/neosubhamoy/neosubhamoy-portfolio.git synced 2025-12-20 05:49:35 +05:30

(feat): added hoverable project info tooltip card

This commit is contained in:
2024-08-01 22:23:14 +05:30
parent 646438383a
commit a6fa2a96e7
10 changed files with 209 additions and 11 deletions

View File

@@ -0,0 +1,14 @@
<?php
// function to format given number in youtube views style
function format_number_in_yt_style($num) {
if ($num >= 1000000000) {
return number_format($num / 1000000000, 1) . 'B';
} elseif ($num >= 1000000) {
return number_format($num / 1000000, 1) . 'M';
} elseif ($num >= 1000) {
return number_format($num / 1000, 1) . 'K';
} else {
return $num;
}
}
?>