vicodin Posted July 20, 2008 Share Posted July 20, 2008 Hey guys i am drawing a blank right now how would i cut the rest of the text off in a string at lets say the 200th character? Quote Link to comment Share on other sites More sharing options...
papaface Posted July 20, 2008 Share Posted July 20, 2008 <?php $cut = substr("somthing200charslong",0,200); echo $cut; ?> Quote Link to comment Share on other sites More sharing options...
paul2463 Posted July 20, 2008 Share Posted July 20, 2008 $newstring = substr($oldstring,0, 200); Quote Link to comment Share on other sites More sharing options...
papaface Posted July 20, 2008 Share Posted July 20, 2008 $newstring = substr($oldstring,0, 200); That won't work as it counts from the end. Quote Link to comment Share on other sites More sharing options...
vicodin Posted July 20, 2008 Author Share Posted July 20, 2008 Thank you guys! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.