PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I need to be able to write to certain arrays depending on the number contained in var.
For instance, $num could contain the numbers 1 though 99. If the number is 1 then I want to write some data to $arr1, if it is 2 then I want to write to $arr2, and so on. Because the numbers can range from 1 to 99 I wish not to do a HUGE if else block (or even case).
Is there a way to dynamically decide which array to write to?