5 に答える
1
お役に立てれば。
<?php
//left double quote
$temp = str_replace("“","\"",$temp);
$temp = str_replace("“","\"",$temp);
//right double quote
$temp = str_replace("”","\"",$temp);
$temp = str_replace("”","\"",$temp);
?>
于 2012-11-08T10:01:58.817 に答える
0
これは正常に動作します。テスト済み
$temp = "I want to replace “ and ” characters with the caharacter";
$temp=str_replace("”",'"',$temp);
$temp=str_replace("“",'"',$temp);
echo $temp;
出力
I want to replace " and " characters with the caharacter
于 2012-11-08T09:47:38.103 に答える
0
$temp=str_replace('“',' ',$temp);
$temp=str_replace('"',' ',$temp);
于 2012-11-08T09:51:00.967 に答える
0
ソース コード ファイルと HTTP 接続のエンコーディングを確認してください。これが一致しない場合、置換はおそらく失敗します。
どちらも UTF-8 であることを確認することをお勧めします。
于 2012-11-08T09:56:44.877 に答える
-1
try this way..
$temp=str_replace('”','"',$temp);
$temp=str_replace('“','"',$temp);
if not work use this
$temp=str_replace('“','"',$temp);
$temp=str_replace('”','"',$temp);
于 2012-11-08T09:51:10.933 に答える