PHP For loop with differents IDs
Briefly

To correctly list your IDs from the MySQL result, iterate through the result set using fetch_assoc() instead of a fixed range loop.
Use a loop to fetch each row from the result set and access the ID directly. Replace ‘$x’ with the ‘ID’ from the database.
Read at www.sitepoint.com
[
]
[
|
]