sabret00the
06-25-2005, 10:21 AM
is there a way via MySQL or via a function in php i don't mind to select the first XX lines of a text field i.e. $post[pagetext] and display them instead using the substr function and selecting the first XX characters
ok at the moment i'm thinking i could break it up into an array
$getlines = implode('\n', $post[pagetext]);
$post[pagetext] = "";
$counter = 0;
while ($getlines)
{
$post[pagetext] .= $getlines['$counter'] . "\n";
$counter++;
if ($counter == $linecutoff)
{
break;
}
}
of course it'd be easier to just make it into a function.
what do you think?
ok at the moment i'm thinking i could break it up into an array
$getlines = implode('\n', $post[pagetext]);
$post[pagetext] = "";
$counter = 0;
while ($getlines)
{
$post[pagetext] .= $getlines['$counter'] . "\n";
$counter++;
if ($counter == $linecutoff)
{
break;
}
}
of course it'd be easier to just make it into a function.
what do you think?