我從維基百科網(wǎng)站“https://en.wikipedia.org/wiki/Specials_(Unicode_block)”中讀取unicode塊字符串,但它與編碼無(wú)關(guān),并且如何不刪除有時(shí)出現(xiàn)的符號(hào)“”,因?yàn)檫@個(gè)字符串在PHP語(yǔ)言上不知道。這是我的代碼(php):<?php$str1 = 'Apple iPhone X , 64GB , Space Gray';$title1 = substr($str1, 0, 15) . '...'; echo str_replace('/[\s]+/','',$title1);echo '<br>';$str2 = 'ipod ???? ????? ?? ???';$title2 = substr($str2, 0, 15) . '...'; echo str_replace('/[\s]+/','',$title2);?>外:Apple iPhone X ...ipod ???? ?...如何刪除問(wèn)號(hào)' '?
如何使用PHP刪除問(wèn)號(hào)(字符串)
開(kāi)滿(mǎn)天機(jī)
2022-08-19 10:25:18