I have an array $_arr of 41 elements and about 500 rows, including apostrophes (and other stuff probably!) in some strings. I need to escape the apostrophes and have tried both the following with no success: $_arr = str_replace(" ' "," \' ",$_arr); and foreach ($_arr as $_arr2){ foreach ($_arr2 as $var){$var = addslashes($var);} } can anyone help out? thanks, alan dunn