Answers for "how to get first letter of name in laravel"

PHP
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 "how to get first letter of name in laravel"

Browse Popular Code Answers by Language