DrTrans Posted November 18, 2011 Share Posted November 18, 2011 $text = "this is a lot of effing text" what i want to do is limit it to the 10 characters so it gives back $stext = substr($text, 10); <-- this is how i thought it would work echo " $stext"; Link to comment https://forums.phpfreaks.com/topic/251358-limiting-the-amount-of-returned-characters-from-variable/ Share on other sites More sharing options...
xyph Posted November 18, 2011 Share Posted November 18, 2011 Check out substr in the manual. Note the order of the arguments. Link to comment https://forums.phpfreaks.com/topic/251358-limiting-the-amount-of-returned-characters-from-variable/#findComment-1289207 Share on other sites More sharing options...
DrTrans Posted November 18, 2011 Author Share Posted November 18, 2011 Thanks mate, forgot to see that u had to make a start position Link to comment https://forums.phpfreaks.com/topic/251358-limiting-the-amount-of-returned-characters-from-variable/#findComment-1289208 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.