kpetsche20 Posted June 28, 2008 Share Posted June 28, 2008 I want to limit the viewable area on the user end, when displaying articles, so my page doesn't elongate too much. How do I count characters in a variable. Quote Link to comment Share on other sites More sharing options...
LooieENG Posted June 28, 2008 Share Posted June 28, 2008 <?php echo strlen($var); ?> Quote Link to comment Share on other sites More sharing options...
kpetsche20 Posted June 28, 2008 Author Share Posted June 28, 2008 How do i only display a certain number of characters in a variable? Quote Link to comment Share on other sites More sharing options...
br0ken Posted June 29, 2008 Share Posted June 29, 2008 $startPos = 0; $endPos = 8; $var = "This is just a simple test to limit variable size."; echo substr($var, $startPos, $endPos); 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.