-2
我建立一個拼寫檢查程序,我使用的foreach變量得到一長串一個字。我想是,如果文字是包裹着引號,應該呼應了引號,呼應了字,然後在如果有的話結束呼應其他引號...所有引號獲取文本並顯示
請幫助...
提前致謝。
我建立一個拼寫檢查程序,我使用的foreach變量得到一長串一個字。我想是,如果文字是包裹着引號,應該呼應了引號,呼應了字,然後在如果有的話結束呼應其他引號...所有引號獲取文本並顯示
請幫助...
提前致謝。
<?php
$word = '"TheWordSurroundedWithQuotationMark"';//This is the foreach variable,i initialised this with random thing
if(2==substr_count($word, '"'))//checking if the string is wrapped with quotation marks
{
$items = explode('"',$word);
echo 'The string is surronded with Quotation marks ==> '.$items[1];
}
?>
其實我想提出一個拼寫檢查.....所以,我想無論是在前面或後面的字...它應該刪除它,也呼應了字,並沒有與任何在那裏.... – shahbaz
您是否嘗試過一些事情嗎?請先發布你的代碼,你做了什麼,然後你得到了什麼錯誤? –