[Solved] Limit text length and putting read more button


You can limit the length of $row[‘newscontent’] with the substr function

echo substr($row['newscontent'], 0, 199);

There are various hang-ups that you should be aware of though: it will take 200 characters, it doesn’t handle multibyte strings well (utf-8 etc) and if your newscontent contains markup, it will likely be broken

1

solved Limit text length and putting read more button