Can’t seem to get this one. I would like to get the first 2 characters from the word before the first space and first 3 characters after the first space.
Not sure if break up the word in [0], [1] would work, but regex might work.
$string = "Bobby Ryan";
$output = 'BoRya';
Thanks
What have you tried?
suggestion: explode() your string on the space character, get the first and last values in the array by index, then use substr() to fetch the characters you require.