What do you do outside of class? How do you study/do homework? Also, in all seriousness and no offense intended, have you ever been tested for a learning disability?
not tested but i do not understand things at one go im quiet weak and slow when it comes to studying but i got soo much interest in learning how to code a site. after class i come home try to do the work asked by my teacher ask like if he shows me how to work with array the same thing he would ask me to do it in a different way and that is where i get stuck.
he has taught me how to do a login system but now when im asked to do it myself i cannot. im starting to get dishearted man.
It sounds like one of two things is happening -
1. You're not naturally gifted at this. It's okay, not a lot of people are. I often have to read, then re-read, then re-re-read, etc. a lot myself before I finally feel like I grasp the idea of a new bit of code. Discipline and tenacity are really the only ways to get through it.
2. You have a learning disability.
I think you should get tested for it. If you find that you
do have a learning disability, you'll finally understand what is causing your frustration and can be taught ways to mitigate it. If you don't have one, the person/place testing you could still most likely come up with a way to improve your study habits. Getting tested is a win-win.