$str = eregi_replace( "'", '"', $str );
I think this will work. You might can't see a difference unless you copy and paste it to notepad or something.
Basically, in the first paramenter, used double quotes to enclose the single quote -- " ' ". And in the second parameter, I used single quotes to enclose the double quote -- ' " '.
Hope it helps. 🙂