There is a addslashes(); function that will do that for you. However I don't think you need both " and ' to be escaped. I would just create your own custom one then for Orcale.
function oracle_escape_string($str)
{
[INDENT]return str_replace("\"", "\\\"", $str);[/INDENT]
}
or
function oracle_escape_string($str)
{
[INDENT]return str_replace("'", "\'", $str);[/INDENT]
}
Of course this is if you wrap your queries with ".