Navigating arrays is an art, and PHP’s functions are your paintbrushes Getting close to completion. In the last article we looked at string functions and in this one we’re going to take a look at all the various and common array functions. https://www.dinocajic.com/string-functions/ trim(),  ltrim() ,  rtrim() htmlspecialchars() __call() preg_match() filter_var() addslashes() str_replace() strlen() strtolower() strtoupper() ucfirst() strpos() , stripos() , strrpos() , strripos() Array Functions like:  array_chunk(), array_diff(), array_key_exists(), array_key_first(), array_key_last(), array_map(), array_merge(), array_push(), array_sum(), asort(), arsort(), count(), in_array(), ksort(), krsort(), sort(), rsort(), shuffle(), sizeof(), is_array(), explode(), implode() Magic Methods like: __invoke(), __toString() array_chunk() If you have an array,

PHP Multidimensional Arrays: How Many Dimensions Deep Have you Been? What are PHP multidimensional arrays? Just think of an array within an array. In other words, it’s an array that stores arrays as elements. Those elements that are arrays themselves can have arrays as elements. The easiest way to explain this is with some examples. In the previous article on associative arrays, we looked at the $person array.     The $person array contains a few key/value pairs such as the person’s name, age, email, occupation, and book_title. The book_title represents the book the author has written. I would assume

I’d Like you to Meet my associate. What are PHP Associative Arrays? If you’re familiar with other programming languages, an associative array is pretty much a dictionary. Instead of accessing the array by using an index value, you’ll access it by using a key. That key points to a value. Keys in PHP can be integers or strings. If you attempt to store a floating point number as a key, it will be cast to an integer. Boolean value true will be case to 1 and false will be cast to 0. We can access a regular array with the index value of the

Once you understand PHP Arrays, they really do become simple. 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 the array (I know we haven’t covered loops yet) and display each array element. There are different