Hello.
1) Is there a way to know within the 'while' statement's when it's on it's last iteration? The 'while' test is based on a var = 'mysql_fetch_array()'. I want to know when it's in it's final 'true' state (on last iteration) just before it turns 'false'.
The existing script that contains the 'while' is being called from a custom function I've created via an 'include()'. I only want to run that included script to a certain point, grab the data, then get back to the calling function before that included script goes to the lines following that 'while' which prints the results found. The way the included script is coded, I can break into the 'while' without file editing.
At the end of its last iteration, I want to add a statement to break out of the 'while' before reaching the '}' and return back to the calling function. I'm guessing I need to tell the script to stop first (?) vs. leaving it hanging by adding an abrupt 'return' statement (?).
2) How to formally 'stop' the 'while' just prior to it's thinking it's done (after the last statement of the last iteration), and 'return' to the calling function?
Thanks in advance.