Click to See Complete Forum and Search --> : Few string questions..
|2eM!x
Sep 27th, 2005, 08:23 PM
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
{yak}
Sep 28th, 2005, 07:34 AM
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() (http://us3.php.net/str_replace)
For your second question, sounds like substr() is what you're looking for. substr() (http://us3.php.net/manual/en/function.substr.php)
visualAd
Sep 28th, 2005, 11:40 AM
You can also use preg_replace() (http://www.php.net/preg_replace) and preg_replace_callback() (http://www.php.net/preg_replace_callback) to find and replace strings matching regular expressions.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.