PHP — P9: Simple Arrays

Dino Cajic
Dev Genius
Published in
8 min readJun 25, 2020

--

PHP Simple Arrays

What is an array? In layman's terms, it’s a way to store multiple items together under one variable. You could create different variables for everything, but sometimes that’s just not practical. Imagine that you’re pulling thousands of records from a database. You can’t, or shouldn’t, create thousands of different variables to store each record. You would use an array and store all of the records under one variable. You could then loop through…

--

--

Author of An Illustrative Introduction to Algorithms. IT Leader with a B.S. in Computer Science, a minor in Biology, and a passion for learning.