Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Limpia caracteres para pasar de postgres a mysql
<title>Limpia los insert para pasar de Postgres a Mysql</title>
<meta charset="UTF-8">
$str = "Cadena de Insert a cambiar";
$str = str_replace("\xe2\x80\x8b", '', $str);
$str = str_replace("\xCC\x81n", '', $str);
$str = str_replace("\xCC\x81s", '', $str);
$str = str_replace("\xCC\x81", '', $str);
$str = str_replace("'t'", '1', $str);
$str = str_replace("'f'", '0', $str);
echo $str;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment