SyntaxFix
Write A Post
Hire A Developer
Questions
//if i input 9 it should go to 8?
You still have to work with the elements of the array. You will count 8 elements when looping through the array, but they are still going to be array(0) - array(7).