Answers for "laravel get first letter"

PHP
14

php get first character of string

$firstStringCharacter = substr("hello", 0, 1);
Posted by: Guest on October-19-2019
1

laravel get first letter of each word

$words = explode(" ", "Community College District");
$acronym = "";

foreach ($words as $w) {
  $acronym .= $w[0];
}
Posted by: Guest on May-31-2021

Code answers related to "laravel get first letter"

Browse Popular Code Answers by Language