SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the substr function like this:
substr
echo substr($myStr, 0, 5);
The second argument to substr is from what position what you want to start and third arguments is for how many characters you want to return.