Click to See Complete Forum and Search --> : pushing values in array ??


PHPycho
07-03-2007, 08:24 AM
Hello forums !!
I would like to push the values in array(without specifying index).
Can anybody give me the suggestion.
Note: It should be equivalent to PHP's
$exp_array = array();
$exp_array[] = "value1";
$exp_array[] = "value2";
(without specifying indexes)
...........etc

laserlight
07-03-2007, 12:41 PM
If this pertains to Javascript, I believe the answer lies in push, quite literally:
exp_array = new Array();
exp_array.push("value1");
exp_array.push("value2");
exp_array.push("value3", "value4", "value5");