The PHP array is an extremely versatile creature. You can use it as a map, or a set, or a data object…