I have this string: computers,cars,movies,sports,etc...
$cars = explode(',', $cars)
How can i echo lets say 25 chars from 开发者_Go百科the string?
You can achieve it using the substr
function:
echo substr($str, 0, 25);
I have this string: computers,cars,movies,sports,etc...
$cars = explode(',', $cars)
How can i echo lets say 25 chars from 开发者_Go百科the string?
You can achieve it using the substr
function:
echo substr($str, 0, 25);
精彩评论