sentence get first second word php laravel

Solutions on MaxInterview for sentence get first second word php laravel by the best coders in the world

showing results for - "sentence get first second word php laravel"
Antonio
09 Sep 2018
1// Example 1
2$pizza  = "piece1 piece2 piece3 piece4 piece5 piece6";
3$pieces = explode(" ", $pizza);
4echo $pieces[0]; // piece1
5echo $pieces[1]; // piece2
6
7output:
8//piece1
9//piece2
Lesly
06 Jan 2019
1$words = explode(" ", "Community College District");
2$acronym = "";
3
4foreach ($words as $w) {
5  $acronym .= $w[0];
6}
7