| Viewed 94 times

How I should return the middle character of a string in PHP?


If the word's length is odd, return the middle character. If the word's length is even, return the middle two characters.

PHP