Note that there are some explanatory texts on larger screens.

plurals
  1. POPagination-How to display the results per page?
    primarykey
    data
    text
    <p>I have already done my scripting to display only 40 results per page,but I cant let the user to see the remaining results in the next page.I am getting the data using Curl operation.</p> <p>I am not posting the code because it is so lengthy. Please check this <a href="http://www.travelpunk.com/blog/result/?action=search&amp;search_propertyid=&amp;search_from_suggestion=0&amp;searchkeywords=Melbourne,%20Australia&amp;reset=1&amp;search_type=dropdown&amp;city=Melbourne&amp;country=Australia&amp;search_keywords=Or%20type%20a%20city%20or%20property%20name&amp;propType%5B%5D=HOSTEL&amp;propType%5B%5D=GUESTHOUSE&amp;propType%5B%5D=HOTEL&amp;propType%5B%5D=APARTMENT&amp;propType%5B%5D=CAMPSITE&amp;date_from=07%20Oct%202013&amp;NumNights=3&amp;guests=2&amp;group_type=#" rel="nofollow">link</a></p> <p>So,How can I display the remaining results on the next page?</p> <p>Sorry,if there is any mistake in my Question. Thank you</p> <pre><code> if($search_results['api']['status']=="Success") { $inc= 1; $ert = $search_results['result']['Properties']; if($sortby=='Name'){ foreach ($ert as $name) { $names[] = $name['name']; } array_multisort($names, SORT_ASC, $ert); } if($sortby=='OverallRating'){ foreach ($ert as $name) { $names[] = $name['avgRating']; } array_multisort($names, SORT_NUMERIC,SORT_DESC, $ert); } if($sortby=='Price'){ foreach ($ert as $name) { $tuti = array_keys($name['bedPrices']['cheapestPrivate']); // echo $name['bedPrices']['cheapestPrivate'][$tuti[0]]; $names[] = $name['bedPrices']['cheapestPrivate'][$tuti[0]]; } array_multisort($names, SORT_NUMERIC,SORT_ASC, $ert); } // var_dump($ert['bedPrices']); foreach($ert as $hostels) { if($inc&gt;$page_limit){ continue; } if(!((int)$hostels['avgRating'] &gt;= (int)$min_rate &amp;&amp; (int)$hostels['avgRating'] &lt;= (int)$max_rate)) continue; if(!((int)$hostels['bedPrices']['cheapestPrivate']['USD'] &gt;= (int)$min_pricing &amp;&amp; (int)$hostels['bedPrices']['cheapestPrivate']['USD'] &lt;= (int)$max_pricing)) continue; if(!(in_array($hostels['type'],$properties_zan_array))) continue; // var_dump($hostels); $arry_hostel = (array) $hostels; foreach ($arry_hostel['roomTypes'] as $hkey =&gt; $hvalue) { if(arrayInString($roomtype_zan_array,$hvalue['description'])){ echo $hostels[0]['ResultCount']; ?&gt; &lt;?php $propNum1 =$hostels['number']; ?&gt; &lt;div class="search_result"&gt; &lt;div class="se_img"&gt; &lt;div class="top_rated"&gt;Top Rated&lt;/div&gt; &lt;form action='hostel-details' method='GET'&gt; &lt;input type='hidden' name='hname' value='&lt;?php echo $hostels['name'];?&gt;'&gt; &lt;input type='hidden' name='city' value='&lt;?php echo "$citi" ;?&gt;'&gt; &lt;input type='hidden' name='date_st' value='&lt;?php echo "$startdate" ;?&gt;'&gt; &lt;input type='hidden' name='date_end' value='&lt;?php echo "$enddate" ;?&gt;'&gt; &lt;input type='hidden' name='num' value='&lt;?php echo "$Num" ;?&gt;'&gt; &lt;input type='hidden' name='propnum' value='&lt;?php echo "$propNum1" ;?&gt;'&gt; &lt;input type='hidden' name='guestnum' value='&lt;?php echo $guests?&gt;'&gt; &lt;a href='#' onclick='this.parentNode.submit()'&gt; &lt;img src="&lt;?php echo $hostels['images']['0']['url'] ?&gt;" height="80" width="120" class="search_img" title="&lt;?php echo $hostels['name']; ?&gt;" /&gt; &lt;/a&gt; &lt;span&gt;&lt;?php echo $hostels['type']; ?&gt;&lt;/span&gt; &lt;/div&gt; &lt;div class="se_detail"&gt; &lt;form action='hostel-details' method='GET'&gt; &lt;input type='hidden' name='hname' value='&lt;?php echo $hostels['name'];?&gt;'&gt; &lt;input type='hidden' name='city' value='&lt;?php echo "$citi" ;?&gt;'&gt; &lt;input type='hidden' name='date_st' value='&lt;?php echo "$startdate" ;?&gt;'&gt; &lt;input type='hidden' name='date_end' value='&lt;?php echo "$enddate" ;?&gt;'&gt; &lt;input type='hidden' name='num' value='&lt;?php echo "$Num" ;?&gt;'&gt; &lt;input type='hidden' name='propnum' value='&lt;?php echo "$propNum1" ;?&gt;'&gt; &lt;input type='hidden' name='guestnum' value='&lt;?php echo $guests?&gt;'&gt; &lt;!--&lt;a href="#" onclick='this.parentNode.submit()' style="font-size: 14px;"&gt;--&gt; &lt;a href="#"&gt;&lt;button style="border: none;"&gt;&lt;font style="color:blue"&gt; &lt;h2 class="se_title" &gt;&lt;?php echo $hostels['name']; ?&gt;&lt;/h2&gt; &lt;!--&lt;/a&gt; &lt;/form&gt;--&gt; &lt;div class="se_meta"&gt;&lt;?php echo $hostels['address1'].", ".$hostels['address2'] ?&gt;&lt;/div&gt;&lt;/font&gt;&lt;/button&gt;&lt;/a&gt;&lt;/form&gt; &lt;?php $propNum =$hostels['number']; ?&gt; &lt;!-- &lt;div class="se_warning"&gt;Minimum stay of 4 nights for your selected dates&lt;/div&gt; --&gt; &lt;div class="se_desc"&gt;&lt;?php echo substr($hostels['shortDescription'],0,80)."..." ?&gt; &lt;!-- &lt;a href="#"&gt;More Info&lt;/a&gt; --&gt; &lt;form action='hostel-details' method='GET'&gt; &lt;input type='hidden' name='hname' value='&lt;?php echo $hostels['name'];?&gt;'&gt; &lt;input type='hidden' name='city' value='&lt;?php echo "$citi" ;?&gt;'&gt; &lt;input type='hidden' name='date_st' value='&lt;?php echo "$startdate" ;?&gt;'&gt; &lt;input type='hidden' name='date_end' value='&lt;?php echo "$enddate" ;?&gt;'&gt; &lt;input type='hidden' name='num' value='&lt;?php echo "$Num" ;?&gt;'&gt; &lt;input type='hidden' name='propnum' value='&lt;?php echo "$propNum" ;?&gt;'&gt; &lt;input type='hidden' name='guestnum' value='&lt;?php echo $guests?&gt;'&gt; &lt;!-- &lt;input type='hidden' name='search_res' value='&lt;?php echo base64_encode(serialize($hostels)); ?&gt;' /&gt; --&gt; &lt;a href='#' onclick='this.parentNode.submit()'&gt;More Info&lt;/a&gt; &lt;/form&gt; &lt;/div&gt; &lt;div class="se_review"&gt; &lt;?php if($hostels['avgRating']==0) { echo '&lt;span style="font-weight:bold;float:left;"&gt;No Rating&lt;/span&gt;'; } else { echo '&lt;div class="se_per"&gt;'.$hostels['avgRating']."%".'&lt;/div&gt;'; } ?&gt; &lt;a href="#"&gt; &lt;?php if($hostels['starRating']!='None' &amp;&amp;$hostels['starRating']!=0) { echo $hostels['starRating']." Total Reviews"; } else echo '&lt;span style="font-weight:bold;"&gt; No Reviews&lt;/span&gt;'; ?&gt; &lt;/a&gt; &lt;div style="clear:both;"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="se_compare"&gt; &lt;!--&lt;input type="checkbox" class="comp_check"/&gt; &lt;label class="cmp"&gt;Compare (0 of 5)&lt;/label&gt; --&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="se_price"&gt; &lt;?php if(!empty($hostels['bedPrices'])) { if(isset($hostels['bedPrices']['cheapestDorm'])) { foreach($hostels['bedPrices']['cheapestDorm'] as $currency=&gt;$price){ echo '&lt;div class="do_form"&gt;Dorms From&lt;/div&gt;'; echo '&lt;div class="do_price"&gt;'.$currency.$price.'&lt;/div&gt;'; } } if(isset($hostels['bedPrices']['cheapestPrivate'])) { foreach($hostels['bedPrices']['cheapestPrivate'] as $currency=&gt;$price) { echo '&lt;div class="do_form"&gt;Privates From&lt;/div&gt; &lt;div class="do_price"&gt;'.$currency.$price.'&lt;/div&gt;'; } } } ?&gt; &lt;div class="book_btn"&gt; &lt;form action='hostel-details' method='GET'&gt; &lt;input type='hidden' name='hname' value='&lt;?php echo $hostels['name'];?&gt;'&gt; &lt;input type='hidden' name='city' value='&lt;?php echo "$citi" ;?&gt;'&gt; &lt;input type='hidden' name='date_st' value='&lt;?php echo "$startdate" ;?&gt;'&gt; &lt;input type='hidden' name='date_end' value='&lt;?php echo "$enddate" ;?&gt;'&gt; &lt;input type='hidden' name='num' value='&lt;?php echo "$Num" ;?&gt;'&gt; &lt;input type='hidden' name='propnum' value='&lt;?php echo "$propNum" ;?&gt;'&gt; &lt;input type='hidden' name='guestnum' value='&lt;?php echo $guests?&gt;'&gt; &lt;!-- &lt;input type='hidden' name='search_res' value='&lt;?php echo base64_encode(serialize($hostels)); ?&gt;' /&gt;--&gt; &lt;a href='#' onclick='this.parentNode.submit()'&gt;Book Now&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="clear:both;"&gt;&lt;/div&gt; &lt;/div&gt; &lt;?php break; } } $inc++; } echo $inc; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload