Jump to content

[SOLVED] text problem


thanatosx

Recommended Posts

<?php

$string = "supercalafragilisticexpaladosous";
$charsperline = 10;
$outputlines = array();
$pos = 0;

while(!$stop) {
$outputlines[] = substr($string, $pos, $charsperline);
$pos = $pos + $charsperline;
if(substr($string, $pos, $charsperline) == "") {
	$stop = true;
}
}

foreach($outputlines as $line) {
echo "$line<br />";
}

?>

Link to comment
https://forums.phpfreaks.com/topic/53617-solved-text-problem/#findComment-265016
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.