Join Free
+ Reply to Thread
Results 1 to 1 of 1
  1. #1

    Howto: Displaying 1-10 of xxxx

    This one is quick and easy. When you setup your api call, find the following line:

    PHP Code:
    $prosperentApi->fetch(); 
    Directly after it, add the following two lines:

    PHP Code:
    $response $prosperentApi->getJsonResponse();
    $totalResults $response['totalRecordsFound']; 
    The first line grabs the extra json response data, and the second line assigns totalRecordsFound to a variable that you can reuse later in your code.

    Last, wherever you want to display your total records found add:

    PHP Code:
    1 to 10 of
        <?=$totalResults?>
        results
    That's it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
coupons | coupons and deals