| yes abc, you are right. echo $ob->questionArray would print "array" , however echo $ob->questionArray[0] would print my first test question id.
<input type=hidden name=questionArray[] value=$ob->questionArray> " ... now when i send this in a form, one might think that "$questionArray[0]" would print out the first test question also on the page it was submiited to, .. but it did not. it printed "Array".
i am familiar with how you would manipulate arrays in c++ by pointers, however php executes once and generates your page. after your page is generated, your program is done. you rely on your browser for any type of variables. you don't have the luxory of keeping your program running in between pages.
well, .. if you count sessions, but that is not the same. sessions are definately an alternative. i could register the array in a session, but i didn't want to do that. i was hoping i could simple pass an array through a form using a hidden field without a loop.
the loop works fine though.
thanks for the input ! |