There are many times when you end up creating a collection – either for output or use for performing further processing. There’s a common pattern that’s used when creating collections for output that’s very inefficient.
That pattern is:
$data =… Read the full text.