Dynamic Accordion in WordPress
Not sure what you are trying to achieve, but you can use numerical values for enum_of_collapsible_numbers and you can generate them like this
$enum_of_collapsible_numbers = range(1, 20);