A display problem for a super large array
The problem is that in a directory on the server, there are many files, size 523M, add up the number of rows is 2624960, the data in the file is one line, put on the page display, each page 17, so the page is 2624960/17 154410 pages, The time to do is to put the number of pages into the array, in the Foreach Loop to show, pagination into a drop-down box
foreach ($p _slist2 as $value = $caption)
{
echo "
if ($p _setto2 = = $value)
{
echo "Selected";
}
echo "> $caption";
}
When the file capacity is small, the above code can perform the display, can now file capacity, breakpoint troubleshooting, execution to this interruption, and later changed the way
For ($i =1, $len =count ($p _slist2); $i <= $len; $i + +) {
if ($i = = $p _settos2) echo "$i ";
else echo "$i ";
}
To write this, open the drop-down box can only show to 45,189, but I print the entire large array when it can display all 154410, this is why, know the friend!!!!!!
------Solution--------------------
Grovan data on the page? Who's this for?
The drop-down box does not show that the upper limit of the select control should be exceeded