In the query I have order by name (alphabetically), stick the query in $res, and then loop over the results.
while($rs = mysql_fetch_assoc($res)){
echo $rs['name'];
}
Now in that while loop there is a “webmaster” name. I need to take “Webmaster” and place it at the end of the loop (so it echoes out last) or place “Webmaster / Affiliate ProgramsWebshops” in $res (at the end of the query before hitting the while loop.
easiest way would be to edit your query and change the ordering from:
to
note: this
IFis mysql-syntax – you havn’t posted wich database you’re using. on postgres it would be something like (not 100% sure):EDIT to explain this: by changing the order this way, it’s like putting an additional column to the ordering that contains
1if the name is “webmaster” or0in every other case. by ordering by this “column” first, the “webmaster” is always at the end (or: all “webmaster”s – if there are more than one)