<?php
define('lenth',64);
$word="sdfdsjkh sdfjhjjfgjhdf sdfsdfdsfsf sdfsdfsdf sdkjf sdkjh sdfjh sdkf skdj sdkj kjsd kjsdfkj sdf kdsjfh k sdkj k sdkfj dsfhjk sdkjf sdkj sdkjf sdkfj sdfkj sdkjf sdkjf ,skdjfh,..sdkjfh sdkjf ..sdfjhkj :;fdskj dsfjh sdfjsdfjh sdfkjhsd fkjsdfhk j. sdjfkl/ sdfkj sdflkj sdfjkl()sdf lkds fj+_+_f lkjfds kljlds f^%@$#^% ";
$neww=substr($word,0,lenth) ;
while($neww)
{
if($neww{lenth-1}==" ")
{
echo $neww."<br>";
$word=substr($word,lenth);
$neww=substr($word,0,lenth);
}
else
{
if($word{lenth}!=" ")
{
$i=0;
while($neww{$i})
{
if($neww{$i}==" ")
{
$j=$i;
}
$i++;
}
$neww=substr($word,0,$j+1);
echo $neww."<br>";
$word=substr($word,$j+1);
$neww=substr($word,0,lenth) ;
}
else
{
echo $neww."<br>";
$word=substr($word,lenth);
$neww=substr($word,0,lenth) ;
}
}
}
define('lenth',64);
$word="sdfdsjkh sdfjhjjfgjhdf sdfsdfdsfsf sdfsdfsdf sdkjf sdkjh sdfjh sdkf skdj sdkj kjsd kjsdfkj sdf kdsjfh k sdkj k sdkfj dsfhjk sdkjf sdkj sdkjf sdkfj sdfkj sdkjf sdkjf ,skdjfh,..sdkjfh sdkjf ..sdfjhkj :;fdskj dsfjh sdfjsdfjh sdfkjhsd fkjsdfhk j. sdjfkl/ sdfkj sdflkj sdfjkl()sdf lkds fj+_+_f lkjfds kljlds f^%@$#^% ";
$neww=substr($word,0,lenth) ;
while($neww)
{
if($neww{lenth-1}==" ")
{
echo $neww."<br>";
$word=substr($word,lenth);
$neww=substr($word,0,lenth);
}
else
{
if($word{lenth}!=" ")
{
$i=0;
while($neww{$i})
{
if($neww{$i}==" ")
{
$j=$i;
}
$i++;
}
$neww=substr($word,0,$j+1);
echo $neww."<br>";
$word=substr($word,$j+1);
$neww=substr($word,0,lenth) ;
}
else
{
echo $neww."<br>";
$word=substr($word,lenth);
$neww=substr($word,0,lenth) ;
}
}
}