Hi there...
I'm loving arrays!
I have a set of checkboxes in the array like such:
<td><input type="checkbox" name="CheckedArray[<?php echo $ID?>]"></td>
If I print_r my array I get: Array ( [6] => on [3] => on [7] => )
which is correct.
then(check against a file):
if($CheckedArray[$anotherID] !="") $Array[] =$anotherID;
and print_r gives: Array ( [0] => 6 [1] => 3 )
and heres where it goes wrong
if $Array already has values I want to add the new ones...
$Array = $Array + $Array;
gives Fatal error: Unsupported operand types
but
http://www.php.net/manual/en/language.operators.array.php
seems to suggest that I should be able to do this
And I've tried playing round like:
setting
$a = $Array;
before $Array is populated again then
$b = $Array;
(with new values)
and
$Array = $a + $b;
but no dice....
any ideas please??
thanks
Beth