Created
June 3, 2016 13:43
-
-
Save beanmoss/df065c8b3dba6fa10d562e94c9a2c7bf to your computer and use it in GitHub Desktop.
Ahmed Mehar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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