September 23rd, 2000, 04:33 PM
I want to output mysql data by groups (states). However each time php/mysql comes to a new state in the results I want it to print the state name before putting the results. Does php have some sort of memory function to recognize when the state has changed?
dataalabama3...until new state then it puts
etc.until new state. then
September 23rd, 2000, 06:14 PM
Yes, they're called variables.
Assign the state to a variable and then compare it to each record as you retrieve them. If it's different, change the temp variable to the new state and print out a header line.
// print record info