I've got this problem that I can't solve. Partly because I can't explain it with the right terms. I'm new to this so sorry for this clumsy question.
Below you can see an overview of my goal.
i have the products along with check boxes.if i checked that check box that index value should store in new array(should perform push() operation here),if in case again unchecked that check box means it should perform pop() operation.
<form method="post">
<input type="checkbox" name="options[]" value="Politics"/> Politics<br/>
<input type="checkbox" name="options[]" value="Movies"/> Movies<br/>
<input type="checkbox" name="options[]" value="World "/> World<br/>
<input type="submit" value="Go!" />
may be this one is duplicate question for give me sorry
any ideas ?