$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);
}
My teacher wants me to change this use of explode()
to str_split()
while keeping the same output. How do I do this?