0
我有這樣的代碼:PHP:字符串格式的更換和添加字符
$array[] = "<b> FLYDANNA® HEADWRAP </b> <ul> <li type=\"circle\"><i> Sensational headwrap made from 6 pieces of fabric to fit the contours of your head perfectly </i> <li type=\"circle\"><i> Strong yet lightweight cotton wrap can be folded up and stored almost anywhere-;pocket, purse, backpack ... you name it! </i> <li type=\"circle\">";
我想刪除所有的HTML標籤,去除多餘的空格,最後資本單詞後面添加一個雙破折號。另外,在每個</li>
標籤之後,我將添加一段時間。
我需要我把它在陣列中之前將其格式化,所以輸出必須是:
$array[] = "FLYDANNA® HEADWRAP-- Sensational headwrap made from 6 pieces of fabric to fit the contours of your head perfectly. Strong yet lightweight cotton wrap can be folded up and stored almost anywhere-;pocket, purse, backpack ... you name it!";
感謝提前:)
謝謝先生pnomolos快速回復! :D乾杯:)我現在就試試 – marknt15 2010-09-23 00:13:48