Loop Through Characters in String
Could anyone provide an example on how to loop through each character in a string? What I need to do is check if the letter is upper case and then change it to lower case or if it is a space, remove it. I know how to do the change the characters, but I am not sure how to actually get to each character.
|
Re: Loop Through Characters in String
PHP Code:
|
Re: Loop Through Characters in String
A more efficient way:
PHP Code:
|
Re: Loop Through Characters in String
A complete function:
PHP Code:
|
Re: Loop Through Characters in String
Would it be something like this?
PHP Code:
|
Re: Loop Through Characters in String
No it's something like I wrote.
|
All times are GMT -4. The time now is 14:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.