I'm looking for a function that will allow me to find out the first letter of the first word.
For example for the words are "test words" the function will check the first word "test" then return the first letter "t".
Thanks
substr()
let's say your sentence ist in the variable
$word="hello world";
you want the "h" - you go like.
$letter=substr($word, 0,1); echo $letter
Cheers guys.
Ever faster, assuming that you know $word has at least one character:
$word{0}