is there a function in PHP that I can use to replace a specific character with another one, but I should be able to limit the number of replacements done? I am currently trying to get preg_replace() to work, as it has that ability, but there seems to be something wrong. Here is what I am using:
$args[0] = preg_replace("/\$/", $args[$x], $args[0], 1);
$args[0] contains letters and special "$" characters, which should be replaced.
Any help?