HI There:
I have a button which each time is pressed increments the value of a variable by one, I want to use the value of this variable to index elements in an array:
$array[$var] = "what ever"
this is what happens when I press the button and I view
print_r($array)
Array ( [0] => product [5] => whatever )
I intitialized $array[0] to "product" and pressed 5 times the add one button in this example. The second element of the array index changes but the ones before (1,2,3,4 and so on) dissapear so basicaly I am not building the arrray (it should now have 6 entries)
I also tried array_push with the same result
does somebody know what I am doing wrong?
thanks