Answers for "php get only 2 letters from string"

PHP
3

take 10 character from string using php

$return_string = substr("Hi i am returning first 10 characters.", 0, 10);
Output:
"Hi i am re"
Posted by: Guest on August-18-2020
0

get only the first two word from a string php

$message = preg_split('/[\s,]+/', $message, 3)
Posted by: Guest on August-06-2020

Code answers related to "php get only 2 letters from string"

Browse Popular Code Answers by Language