Woodburn2006 Posted May 29, 2007 Share Posted May 29, 2007 if i have a chunk of text stored as a variable, is there a way that i can only display 40 characters on the screen? Quote Link to comment https://forums.phpfreaks.com/topic/53425-display-a-certain-amount-of-characters/ Share on other sites More sharing options...
Gmunky Posted May 29, 2007 Share Posted May 29, 2007 Are you wanting to display the first 40 characters? if so, you can try this echo substr($string,0,40); Quote Link to comment https://forums.phpfreaks.com/topic/53425-display-a-certain-amount-of-characters/#findComment-263981 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.