PROGRAMMING

 
REMEMBERS




Last update:   29-10-2021

Character

ord() - Return ASCII value of character chr() - Return character by ASCII code
 
echo ord("A"); // 65
echo chr(65); // A

Number

number_format() - is not locale-aware, and returns a rounded number
 
echo number_format("100000.698"); // 100,001 
echo number_format("100000.698", 3, ",", " "); // 100 000,698

Pad

str_pad() - Pad a string to a certain length with another string
 
echo str_pad("100", 6, "0"); // 100000
echo str_pad("333", 6, "0", STR_PAD_LEFT); // 000333

Questions    
String regexp

        A B C D E F
🔔
1/2