I have this script that fetches some data from mysql and then uses echo to output it. But, as the page have grown and gotten longer all of a sudden i have this weird behavio
Certainly sounds like a length limit. You could always try something like this:
$content = str_split($row['content'], 65536); foreach ($content as $part) { echo $part; }