
Apr 21st, 2008, 20:56
|
|
Reputable Member
|
|
Join Date: Dec 2005
Location: scotland
Age: 27
Posts: 158
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
|
Re: split xml search into multiple pages?
i did try that but getting the a same results?
- PHP: Select all
.................................................. $properties[$cur_prop] = array ( 'propertyid' => $propertyid, 'date' => $date, 'ref' => $ref, 'price' => $price, 'pricefreq' => $price_freq, 'type' => $type, 'town' => $town, 'provinceName' => $province, 'location' => $location_detail, 'beds' => $beds, 'baths' => $baths, 'pool' => $pool, 'description' => $description, 'images' => $images, // setup image thumb //$image_thumb = substr($list->images->image[$count]->url, 0, -9); ); $cur_prop++; } //foreach ($properties as $key=> $value) //{ // echo $key."-".$value.""; //}
// If we have an array with items if (count($properties)) { // Parse through the pagination class $propertiesPages = $pagination->generate($properties, 10); // If we have items if (count($propertiesPages) != 0) { // Create the page numbers echo $pageNumbers = '<div class="numbers">'.$pagination->links().'</div>'; // Loop through all the items in the array foreach ($propertiesPages as $propertiesArray) { // Show the information about the item $cur_prop = 1; echo "<div class=\"property-box\"> "; echo "<h3>price: " . $properties[$cur_prop]['beds'] . " bedroom " .$properties[$cur_prop]['type'] ." based in " . $properties[$cur_prop]['town'] ."</h3>";
// search and set the primary image counter for use //$count = 0; //while ($properties['image'][$count]->primary != 1) // { //$count++; //} // setup image thumb // $image_thumb = substr($properties['images'], 0, -9);
// echo "<img src=\" " . $image_thumb . "med.jpg\" class=\"property-image\" alt=\"\" />" ; echo "<h4>€" . $properties[$cur_prop]['price'] . "</h4>"; // remove chars from description $description = substr($properties[$cur_prop]['description'], 0, 310); echo "<p> " . nl2br($description) . " ......</p>" ; echo "</div> "; $cur_prop++; //echo '<p><b>'.$properties['propertyid'].'</b> £'.$properties['price'].'</p>'; } // print out the page numbers beneath the results echo $pageNumbers; } } ?>
|