Clinton Posted January 4, 2009 Share Posted January 4, 2009 Lets say that I have a form that has a name and a bio, both of which echo just fine. Well, the bio is hellaciously long and I want to limit the amount of bio that is shown (they can click on the name to view the whole bio). What is the best way to do this? Currently I am using tables but from what I understand the <td> attribute will expand to the content inside regardless of size limitations. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted January 4, 2009 Share Posted January 4, 2009 Well, it's not too complicated actually. Let's say $bio is your bio: <?php if (strlen($bio) > 200) { $bio = substr($bio, 197) . '...'; } Quote Link to comment Share on other sites More sharing options...
Clinton Posted January 4, 2009 Author Share Posted January 4, 2009 Awesome. Thank you. 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.