I have beeen cracking my brain for hours to solve this logic in php but with no succes in site and tried googling it was not clear. Here it goes.
I have this serial ID values 1,2,3,4,5,6,7,8,9,10 as id in my database. Using SELECT statement to call the values was ok. But here is my problem, Using PHP after getting the above from the database, I want one to be added to 1 from the database, one subtracted from 2 from the database, one added to 3 from the database, one subtracted from 4 from the database etc. Each operation should be added to an array which will be called later using a FOR loop.
I thought of using array, if then else, i just cant rap my fingers around it, can someone help
Aucun commentaire:
Enregistrer un commentaire