$tobereplaced = array(
'$db->query',
'fetch_row',
'$db->',
);
$replacedwith = array(
'mysql_query',
'fetch_array',
'mysql_',
);
if ( $blah == 'v1') {
$convedtext = str_replace($tobereplaced, $replacedwith, $convtext);
} elseif ( $blah == 'v2' ) {
$convedtext = str_replace($replacedwith, $tobereplaced, $convtext);
}
Bored... lol