php get word from string code example
Example 1: get specific word from string php
$myString = "input/name/something";
$strArray = explode('/',$myString);
$name = $strArray[1];
$something = $strArray[2];
Example 2: get only the first two word from a string php
$message = preg_split('/[\s,]+/', $message, 3)