2017-09-13 66 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++; 
} 
相关问题