Given this PHP array:
$options['systems'] = array(1, 2, 3)
How would I append the value 4
to the $systems
array within the $options
array?
You could use array_push to push additional items like so:
array_push($options['systems'], 4);
Or the shorthand version:
$options['systems'][] = 4;
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments