Skip to content

Instantly share code, notes, and snippets.

View luckyseven444's full-sized avatar

Gazi Salah Uddin luckyseven444

View GitHub Profile
@hasinhayder
hasinhayder / change-digitis-unicode.php
Last active August 3, 2022 16:42
change digits from english to unicode locale
<?php
function changeDigitsEtoB( $digits ) {
$bangla = numfmt_format(numfmt_create( 'bn_BD', NumberFormatter::TYPE_DEFAULT ),$digits); //Bangla locale
return $bangla;
}
echo changeDigitsEtoB(1234); //output ১২৩৪
@lukecav
lukecav / functions.php
Created December 5, 2017 03:31
Remove add to cart buttons on shop archive page in WooCommerce
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
@janogarcia
janogarcia / php_logical_operators.php
Created December 12, 2012 15:32
PHP Logical operators: The difference between OR vs ||, AND vs && explained. Key concepts: Logical operators precendence. Logical operators short-circuit evalutation.
<?php
// PHP Logical operators: The difference between OR vs ||, AND vs &&
// Key concept #1: "||" and "&&" have greater precedence than "=", "OR", "AND"
// http://php.net/manual/en/language.operators.precedence.php
// Key concept #2: PHP logical operators are short-circuit
// http://en.wikipedia.org/wiki/Short-circuit_evaluation
// http://php.net/manual/en/language.operators.logical.php