How to Get Last Word from String in PHP?

Get Last Word from String in PHP

index.php
PHP Get Last Word from String


Output:

string(13) "Pakainfo.com!"

PHP Get First Word from String

index.php


Output:

string(7) "Welcome"

PHP Get First and Last Word from String

index.php


Output:

string(7) "Welcome" string(12) "Pakainfo.com"

Leave a Comment