I need to declare an empty array in php and add some elements to that array. I know this is possible to fill array in this way:
$list = array("value1", "value2", "value3");
But I want to have something like this:
$list = array();
$list->add("value1"); //pseudo-code
// some other program code
$list->add("value2"); //pseudo-code
Is there any way for doing that?