how to limit characters in a string in php
RegisterLogin
how to limit characters in a string in php
Post Description: how to limit characters in a string in php
Tags: how, to, limit, characters, in, a, string, in, php
This Post Was Posted On Feb 29, 2008 By questions #847
Post Description: how to limit characters in a string in php
Tags: how, to, limit, characters, in, a, string, in, php
This Post Was Posted On Feb 29, 2008 By questions #847
how to limit characters in a string in php by questions
$string = "i have alot of words here and want to make it shorter";
ok, lets say i only want to show the first 15 characters from this string, how would i do that?
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
rob
#1097 1
yes, this is very helpful.
Feb 28, 2008 Reply Report abuse
Webune
#1096 2
you would do it like this:
the output will display something like this:
OUTPUT:
hope this help? if you ever need php web hosting, the best you can find is at www.webune.com
Webune.com has the best php webhoting anywhere. i recommend them to all my customers, they have great support also. i should know, because i am answering this question to you on behalf of Webune.
echo substr($string, 0,15);
the output will display something like this:
OUTPUT:
i have alot of
hope this help? if you ever need php web hosting, the best you can find is at www.webune.com
Webune.com has the best php webhoting anywhere. i recommend them to all my customers, they have great support also. i should know, because i am answering this question to you on behalf of Webune.
Jun 25, 2007 Reply Report abuse
©2011 Webune Forums - Sat Dec 24, 2011 8:49 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3