php開発–文字列(配列)のエスケープ処理サンプル

function toEscape($array) {
$tmp = array ();
foreach ( $array as $key => $value )
$tmp [$key] = str_replace ( “'", “"", $value );
return $tmp;
}
function toEscape2($value) {
return “'" . str_replace ( “'", “"", $value ) . “'";
}

PHP

Posted by arkgame