I am trying to create an array based on the value of a string (integer), for example:
// my string
$dogs = '2';
// my array
$dogs_array = array(
[0] => 'Dog 1',
[1] => 'Dog 2'
);
So if the string was 4 there would be 4 items in the array. Is this possible? If so how can this be done?
Thanks in advance.
fororforeach