Answers for "php get character from string at position"

PHP
14

php get first character of string

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

find index of a character in a string php

<?php
echo strpos("I love php, I love php too!","php");
?>
Posted by: Guest on May-23-2021
1

only display part of string php

substr('abcdef', 1);     // bcdef
substr('abcdef', 1, 3);  // bcd
substr('abcdef', 0, 8);  // abcdef
substr('abcdef', -1, 1); // f
Posted by: Guest on August-21-2020

Code answers related to "php get character from string at position"

Browse Popular Code Answers by Language