Display of a large array about the problem

Source: Internet
Author: User
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.