Jump to content

help splitting up a word...


brown2005

Recommended Posts

[quote author=brown2005 link=topic=116824.msg476216#msg476216 date=1164895917]
why does it have to have the html bit init....
[/quote]

It does not have to have the html bit init. You could do it like you want do it.
For example:
[code]
<?php $word = "cabbage"; ?>
<table>
<tr>
  <th>TheTableHeader</th>
</tr>
<?php for ($i=0;$i<strlen($word);$i++): ?><tr>
  <td>
    <?php echo $word{$i}; ?>
  </td>
</tr><?php endfor; ?>
</table>
?>
[/code]

This works as well. And there are so many more possibilies to do this.
Just use the one you prefer.

[quote author=brown2005 link=topic=116824.msg476216#msg476216 date=1164895917]
what happens if i want a boder or want to put it in a form or something..?
[/quote]

This is just an example of how you could do this, this is not the solution like you would like it.
This shows you how you can do things like this. Use the same logic combined with what you want
and you should be able to code what you want. If you liked an entire solution than ask in the
freelance forum ...

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.