I have a long text ($tekst) and I want to splitt this up in different pages. I've searched the arcive, and found this code, witch is what I need, but it does not work, float is not a recognized function. How can I do this?
I'm a newbie, please be understanding.
$limit = 1000; //your design limit
$tot_len = strlen($tekst);
$iter = float($tot_len/$limit);
$c = 1;
while ($c > $iter) {
$start = ($c-1) * $limit;
if ($iter == $c-1) {
$length = $tot_len % $limit;
} else {
$length = $limit;
}
$page[$c] = substr($tekst,$start,$length);
$c++;
}