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 ...
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.