Hi, I want to add a new element to an array in php, is the following way the correct way? assuming that $chk is an array and $ID contains a value.
$j = count($chk); $j++; $chk[$j] = $ID;
Keep it simple, this is enough:
$chk[] = $ID;
This appends a new element at the end of your array.
Regards, Matthias
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php