04.04.2016, 15:37
Quote:
Unrelated, but pro tip: you can put multiple conditions in the loop header itself. If the condition isn't met the loop stops. Whereas with a nested if the loop keeps on running until it's done, even if there's no more space to store data. So in this case you might write:
PHP код:
|
Other than you saving on (a little bit of) memory by not declaring two extra variables for cache_get_data, I doubt that it matters whether you use my syntax or yours. Mine is a bit more compact.