Str_Replace Not Replace txt

Greetings!

I’m trying to replace some text with the use of str_replace and I’m not having any luck. I’ve looked at past postings and tried different combos and still can’t get it to work. There are no error messages; the word just simply won’t change to the new one.

mysql_select_db($database_rcofcuser, $rcofcuser);
$query_getCalendar = "SELECT * FROM chamber_calendar, months WHERE chamber_calendar.month_id = months.month_id ORDER BY chamber_calendar.year, months.month_id";
$getCalendar = mysql_query($query_getCalendar, $rcofcuser) or die(mysql_error());
$row_getCalendar = mysql_fetch_assoc($getCalendar);
$totalRows_getCalendar = mysql_num_rows($getCalendar);

$phrase = "Ripon Chamber of Commerce presents the 27th Annual Main Street Day and Car Show in downtown Ripon on Saturday, October 15, 2011 starting at 9:00am to 3:00pm.";
$oldWord = "Car Show";
$newWord = "Car Shows";
$row_getCalendar = str_replace($oldWord, $newWord, $row_getCalendar);

$row_getCalendar is not a string, it’s an array. So you want to replace that string in all components of that array?

that doesn’t make too much sense to me.
didn’t you want to write something like


$phrase = "Ripon Chamber of Commerce presents the 27th Annual Main  Street Day and Car Show in downtown Ripon on Saturday, October 15, 2011  starting at 9:00am to 3:00pm.";
$oldWord = "Car Show";
$newWord = "Car Shows";
$result = str_replace($oldWord, $newWord, $phrase);

or what should that $phrase be good for?

You know, you’re right, StarLion. That is an array. I’m just trying to replace ‘Car Show’ words with a different set of words but keep getting some oddball characters and not the affect I want.

I’ve changed it to this and still can’t get it right, apparently:

$row_getCalendar = str_replace("Car Show", "Car Shows", $row_getCalendar);