OK, I'm also a PHP newbie. It makes sense that you would have to actually
apply the results after str_replace changed the variable. Would you help me with the syntax of my particular situation? What I'm trying to do is to be able to type something like {username} or <<username>> in the content of a page and have it replace that with the actual username of whichever user is currently logged in. For example, I'd type "Welcome, {username}." and it would display "Welcome, Bob Wenzel." when Bob is logged in. I'm using Joomla 1.5 and here is my code so far:
$user =& JFactory::getUser();
$row->text = str_replace('{username}', $user->username, $row->text);
I assume that looking in $row->text (the content of the article?) is correct, but please feel free to correct me if that is the wrong place. So what would I do to apply the change? Something like:
JResponse:

etBody($row->text);
or do I need to setContent or something else? Thanks in advance for your help.
Jacom