2017-09-13 41 views
0

我將html表格複製到textarea中。檢測文本區域中的單元格更改

enter image description here

我可以檢測換行符(這將是行)與 爆炸( 「\ n」,str_replace函數( 「\ r」, 「」,$ resultsPasted)) enter image description here

但我還沒有能夠爆炸細胞。有任何想法嗎?

如果我做了一個爆炸空格

foreach ($resultsPastedArray as $resultsRow) { 
    $resultsPastedArray[$i] = explode(" ", $resultsRow); 
    $i++; 
} 

它只是爆炸含書面空格 enter image description here

非常感謝你,

回答

0

它看起來像被分離的細胞的細胞通過標籤。試試這個:

foreach ($resultsPastedArray as $resultsRow) { 
    $resultsPastedArray[$i] = explode("\t", $resultsRow); 
    $i++; 
}