Scoping Issue with PHP Arrays
Posted
by
Nik
on Stack Overflow
See other posts from Stack Overflow
or by Nik
Published on 2011-02-28T15:24:05Z
Indexed on
2011/02/28
15:24 UTC
Read the original article
Hit count: 261
I'm trying to solve this problem where I have a unique array of values within a specific range. Take this scenario: Generate a fixed value array (90) with unique entries. If you find a duplicate, remove, reindex, and fill the void. I'm running into the problem that conditional statements do not allow you to interact with an array outside of it's scope. I'm aware of array_unique
but it doesn't refill those gaps, just makes them. How do I refill those gaps?
© Stack Overflow or respective owner