Answers for "sentence get first second word php laravel"

PHP
1

sentence get first second word php laravel

// Example 1
$pizza  = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
echo $pieces[0]; // piece1
echo $pieces[1]; // piece2

output:
//piece1
//piece2
Posted by: Guest on October-01-2021
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 "sentence get first second word php laravel"

Browse Popular Code Answers by Language