I need to print something to the screen the last time through the loop. My only problem is that I don’t always know which time is going to be the last. It usually shows five records at a time but it could be anything < 5.
@NogDogAug 11.2005 — #Tough one to answer without knowing what type of loop, what needs to be echoed, exactly when it needs to be echoed in relation to any other output generated by each loop iteration, etc.
@bokehAug 11.2005 — #As posted above it is hard to know what you are doing but the easiest way I can think of is echo it after you escape the loop. For example: [code=php]while(something or other){ extract($row); $echo_last_one = $row['key']; } echo $echo_last_one;[/code]
@madddidleyauthorAug 11.2005 — #As posted above it is hard to know what you are doing but the easiest way I can think of is echo it after you escape the loop. For example: [code=php]while(something or other){ extract($row); $echo_last_one = $row['key']; } echo $echo_last_one;[/code][/QUOTE]
I tried that but I need it to be in the loop because I need to echo a link with an Id attached to it.