Have you ever came across a situation where you need to truncate the large text and show the "read more.." link to redirect user to read the full post ?
I know you might be searching for a function to show read more link in php.
Here is our simple function which can be used to show the "Read more.." links dynamically.
The above function can be used anywhere to show read more links with dynamic mysql queries.
How to use this function ???
Here is a simple example to do this
First you will need to create the connection with the database.
Connection settings are stored in "connect.php" file
This will output your article text with proper linking to original post with read more link.
Even you can customize the truncate function for more security check and customizing your display.
Share with friends if you liked it.
MAKNYOSS
8 years ago