Answers for "how to get position of first character in string in php"

PHP
16

php get first character of string

$firstStringCharacter = substr("hello", 0, 1);
Posted by: Guest on October-19-2019
1

php get char from string position

//You can use your string the same as an array :
$some_string = "apple";
echo $some_string[2]; //echo "p"
Posted by: Guest on July-12-2021

Code answers related to "how to get position of first character in string in php"

Browse Popular Code Answers by Language