hoachen Posted October 28, 2006 Share Posted October 28, 2006 Hello, guys. I have trouble to find any example that used class to display limited character. They wayI would like to do is the article will pull from database and will show only 50 character and the rest will display on new page when they click on "View More". Here is what use on my codewhile ($res = $objIData->fetch()) { $app=$res->getStatus(); if($app =='pending' || $app=='cancelled') { echo ''; } else { ?> <?php echo " ". $res->getData();?> Link to comment Share on other sites More sharing options...
justsomeguy Posted October 28, 2006 Share Posted October 28, 2006 Use this function to only show part of the string:http://www.php.net/manual/en/function.substr.php Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now