Jump to content

Recommended Posts

you can try this. It is not optimum and a little long winded, but it works.

 

 

<?php

$string=' Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi ut erat. Vestibulum nisl ante, consectetuer sed, fringilla a, tincidunt ac, leo. Curabitur a ligula luctus quam pretium luctus. Ut augue dolor, hendrerit non, ultricies a, ornare eu, sapien. Duis venenatis aliquet justo. Donec dui enim, pharetra id, adipiscing vitae, euismod id, dolor. Proin viverra massa sed purus. Nunc aliquam lorem vitae tortor. Donec ornare. Aenean ultricies, augue id venenatis commodo, libero quam tincidunt justo, a tempor diam eros sed metus. Aenean luctus sem non quam. Morbi fringilla erat id risus. Cras dui. Nunc suscipit lobortis dolor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras pretium porta quam. Vivamus elementum ullamcorper nunc. Vestibulum orci.
In blandit pellentesque odio. Maecenas gravida. Vestibulum sit amet lectus in nisi porttitor semper. Phasellus non elit ut leo aliquet pharetra. Praesent sagittis luctus nisl. Vestibulum enim. Aenean faucibus, massa nec vulputate ornare, metus diam interdum massa, id vestibulum odio turpis in nulla. Nullam vitae lectus vel augue commodo tempus. Aliquam rutrum sem at ante. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Phasellus eleifend sapien sed libero. Morbi nec nibh nec massa lobortis hendrerit. Proin blandit interdum velit. Phasellus semper. Fusce eros. Morbi a nunc. Nam at lorem at neque placerat tristique. Morbi tincidunt, purus ac cursus faucibus, est nisi pretium mauris, eget iaculis nibh lectus eget metus. Aenean magna elit, fringilla nec, pulvinar sed, dapibus vitae, eros. Praesent congue elit ac ante. In a dui id lorem imperdiet laoreet. Nam eleifend metus nec purus. Donec in nisi eget lacus aliquam condimentum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos.
Proin ligula ipsum, elementum quis, volutpat non, varius a, pede. Curabitur quis tellus. Quisque nisi augue, rutrum a, aliquam sed, vehicula vel, turpis. Lorem ipsum dolor.
';

$split=explode(' ',$string);
$x=0;
while($x < 201)
{
echo $split[$x].' ';
$x++;
}
echo '..... <a href="/somepage.php">Read More</a>';

?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.