Ok I have a blob of text in a variable How could I print only the first 100 lines?
One way could be this: PHP Code: $tidbitText = ""; $fullText = ""; $text = explode("\r\n",mysql_result($query,0,"blob")); for ($i=0;$i<100 || $i < sizeof($text);$i++) $tidbitText .= $text[$i]; for ($i=0;$i<sizeof($text);$i++) $fullText .= $text[$i]; echo $tidbitText."<br /><br />"; echo $fullText;
$tidbitText = ""; $fullText = ""; $text = explode("\r\n",mysql_result($query,0,"blob")); for ($i=0;$i<100 || $i < sizeof($text);$i++) $tidbitText .= $text[$i]; for ($i=0;$i<sizeof($text);$i++) $fullText .= $text[$i]; echo $tidbitText."<br /><br />"; echo $fullText;
http://cpradio.net/ Administrator @ WDForums and a Moderator @ WebXpertz City Forums
yah, thats what I was thinking, I just wondered if there was another/better way. o well. Thanks
Forum Rules