PROGRAMMING

  minte9
learningjourney




R Q

Character

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

Number

number_format() - is not locale-aware, and returns a rounded number
  code
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
  code    
echo str_pad("100", 6, "0"); // 100000
echo str_pad("333", 6, "0", STR_PAD_LEFT); // 000333

Questions    
Last update: 131 days ago
String, String Regexp