first i suggest you read up on mysql_fetch_assoc and mysql_fetch_array on mysql.com, i suggest you should use 2nd here
second $page_row is not declined anywhere
third i think you might try using a while loop like this
$query = "SELECT text,replace,with FROM changetxt";
while($x = mysql_fetch_array($query)) {
$x[text] = str_replace ("$x[replace]","$x[with]","$x[text]");
}
hope that helped you