Answers for "php get char from string position"

PHP
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
0

php substring last 4 characters to censure credit card

$censured_data = '** ** ** ' . substr($row['credit_card_number_from_db'], -4);
Posted by: Guest on November-07-2020

Code answers related to "php get char from string position"

Browse Popular Code Answers by Language