I saw this particular question asked here
My issue is slightly different.
Lets say I have a random integer ( could be any number )
Like so: $rank=123456
Equally it could be $rank=2876545672
What I want to do is split the integer into an array dynamically, and give each value a class.
so it would grab in the example: 123456 the first number and give assign a var like digit-<?=$num['id']
So I could then generate something like:
<span class="digit-1">1</span>
<span class="digit-2">2</span>
<span class="digit-3">3</span>
<span class="digit-4">4</span>
<span class="digit-5">5</span>
<span class="digit-6">6</span>
Is this possible, and if so any ideas how to achieve this ? As tha bove ( spans ) would need to act dynamically so that they are created based on whatever number was generated.
Driving me nuts trying to figure it out.