2 questions:
1) How do you count characters in a string? Use = count the number of places and use that number to determine the length of a <hr> html element.
2) How do you load the contents of a string into an array? I.e. the following string:
joe was here
I want loaded so that I can address as:
array[0] = 'j'
array[1] = 'o'
array[2] = 'e'
etc...
counting the string
Moderator: General Moderators
- Johnm
- Forum Contributor
- Posts: 344
- Joined: Mon May 13, 2002 12:05 pm
- Location: Michigan, USA
- Contact:
These functions in a loopshould do the trick, let me know if you have trouble putting it all together.
John M
http://www.php.net/manual/en/function.strlen.php
http://www.php.net/manual/en/function.substr.php
John M
http://www.php.net/manual/en/function.strlen.php
http://www.php.net/manual/en/function.substr.php