PHP scripts and programs for Beginner to Master

php programs, php ready to use scripts & functions, css tutorials, html, javascripts, ajax examples for Beginner to Master

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.

I'm reading: function to show read more link in phpTweet this!

0 comments:

Post a Comment