【发布时间】:2010-03-09 04:08:35
【问题描述】:
$transData = fgets($fp);
while (!feof ($fp))
{
$transArry = explode(" ", $transData);
$first = $transArry[0];
$last = $transArry[1];
$Sub = $transArry[2];
$Grade= $transArry[3];
echo "<table width='400' ><colgroup span='1' width='35%' /><colgroup span='2' width='20%' /> <tr><td> ".$first." ".$last." </td><td> ".$Sub." </td><td> ".$Grade." </td></tr></table>";
$transData = fgets($fp);
}
我的老师希望我将 explode() 的这种用法更改为 str_split(),同时保持相同的输出。我该怎么做?
【问题讨论】: