mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
$locations = array('location1'); $locations += array('location2', 'location3', 'location4'); to save the hassle of doing one $locations[] = 'location1'; for each location. But += doesn't add any entry if the key of the new array already exists in the original array. So, using my example, the resulting array would be: $locations: array('location1', 'location3', 'location4');