how to do math operation in php array index
Here is my code
echo "<table border=\"5\" cellpadding=\"10\">";
for ($i=0; $i < ceil(count($files1)/5); $i++)
{
echo "<tr>";
for ($c=0; $c<5; $c++)
{
echo "<td>$files1[$i+$c]</td>";
}
echo "</tr>";
}
echo "</table>";
The goal is show the array value into a table with 5 columns. However, php
will not allow me to do math at this part
$files1[$1+$c]
It seems math operation is not allowed here. Anyone can help?
No comments:
Post a Comment