What am I doing wrong?
$title = get_the_title();
$firstLetter = $title[0];
$title[0] = '<span class = "wrapBlue">' . $firstLetter . '</span>';
echo $title; // comes out with weird switched around string?
get_the_title() is a wordpress function.
var_dump on $title gives a string of length 21.
var_dump on $firstLetter gives a string containing the correct character of length 1
As you know
$title[0]refers to the first letter – but what you’re trying to assign isn’t a letter. Try something like this: