Results 1 to 3 of 3
  1. #1

    Order of PHP code (How Do I?)

    Okay, so I have a bit of code that looks like this:

    Now see I want a peice of code ABOVE that that says:

    <?= $statcounter ?> Record(s) Found.
    The problem is, the second code is parsed before the other one, yet I need to get that variable when the first code is done, so that it accurately displays how many records were counted. Does anyone know how I can manage this? - for sale!

  2. #2
    Join Date
    May 2004
    I think you would have to move the first bit of code to the top of the page, before any output.

  3. #3
    Join Date
    Jul 2003
    You need :
    PHP Code:
    <?php echo mssql_num_rows($result?> Record(s) Found.
    You don't need any other loop, if you just want want to know how many records are returned from a query.
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts