I need to insert more than one values in checkbox but now it is seemed to be only the last value am entering is inserting to database.
this is my HTML code
If i understand your problem you are looking for something like this:-
$array= array(
'0' => 123,
'1' => 456,
'2' => 789,
); // this is your post product array oryou want to get last value of that arrray
-----Or----
$array = $_POST['product']; // your post data after submission
end($array); // move the internal pointer to the end of the array
$key = key($array); // fetches the key of the element pointed to by the internal pointer
echo $array[$key]; // 789
Hope it helps!