I have a variable. I want to show 10 letter from there.
$msg = "Hello World! How are you.";
I want to show only Hello Worl this(first 10 letters).
Hello Worl
You need to use the substr() function
substr()
echo substr($msg, 0, 10);