Is there a way for me to return the first character in a string.
For example:
$string = "poop";
$fchar = first_char($string);
echo $fchar;
The output would be "p"
Is there a function like this? (It would be nice)
Or am I going to have to convert the string into an array and print out $array[0]?
For example:
$string = "poop";
$fchar = first_char($string);
echo $fchar;
The output would be "p"
Is there a function like this? (It would be nice)
Or am I going to have to convert the string into an array and print out $array[0]?