Voting

: nine minus one?
(Example: nine)

The Note You're Voting On

phpkid
20 years ago
Well I have been having issues with a shoutbox I am coding it would keep expanding the <TD> if there were large words in it but I fixed it with this:

function PadString($String){
$Exploded = explode(" ", $String);
$Max_Parts = count($Exploded);

$CurArray = 0;
$OutString = '';
while($CurArray<=$Max_Parts)
{
$Peice_Size = strlen($Exploded[$CurArray]);
if($Peice_Size>15)
{
$OutString .= chunk_split($Exploded[$CurArray], 12, " ");
$CurArray++;
} else {
$OutString .= " ".$Exploded[$CurArray];
$CurArray++;
}
}

return $OutString;
}

<< Back to user notes page

To Top