Tag Archives: scale

Scaling/Blowing Up a Two-Dimensional Array in PHP

Tested with PHP 5.3.1

In an upcoming post (Sightlines, or: Drawing Virtual Lines in a Two-Dimensional PHP Array Using Bresenham’s Line Algorithm), I’ll explain why I need to scale/blow up an array to 10x it’s size. Until then, this code snippet might not seem so useful. But, most everything I have written thus far has been leading up to the aforementioned post, and this is certainly a part of it. Read more »