Skip to content

Instantly share code, notes, and snippets.

@beanmoss
Created June 3, 2016 13:43
Show Gist options
  • Save beanmoss/df065c8b3dba6fa10d562e94c9a2c7bf to your computer and use it in GitHub Desktop.
Save beanmoss/df065c8b3dba6fa10d562e94c9a2c7bf to your computer and use it in GitHub Desktop.
Ahmed Mehar
<table border="1">
<?php
$aVeryLongWord = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad';
$chunks18 = str_split($aVeryLongWord,18);
foreach($chunks18 as $chunk)
{
echo "<tr>";
$oneChar = str_split($chunk,1);
foreach($oneChar as $char)
{
echo "<td>".$char."</td>";
}
echo "</tr>";
}
?>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment