Getting first 3 letters of a string in php
- by admin
- 0
Substring function in php:
$myword=”Hai how are you?”;
$result = substr($myword, 0, 3);
echo $result ;
Result will be “Hai”;
Substring function in php: $myword=”Hai how are you?”; $result = substr($myword, 0, 3); echo $result ; Result will be “Hai”;
Substring function in php: $myword=”Hai how are you?”; $result = substr($myword, 0, 3); echo $result ; Result will be “Hai”;