First, how can i replace part of a string, in a string? str_replace(just a guess)?
Secondly, how can i determine what the letter is of a character anywhere in a string?
ex:
yaytaweuih
and then i want to find the 5th letter which is a
Printable View
First, how can i replace part of a string, in a string? str_replace(just a guess)?
Secondly, how can i determine what the letter is of a character anywhere in a string?
ex:
yaytaweuih
and then i want to find the 5th letter which is a
Yeah, str_replace() will work, theirs some other alternatives like preg, but the manual can probably explain it better than I, and has some alternative links as well.
str_replace()
For your second question, sounds like substr() is what you're looking for. substr()
You can also use preg_replace() and preg_replace_callback() to find and replace strings matching regular expressions.