Tag Archives: array

Parse an Array as a String with PHP

Recently I found myself needing to quickly parse an associative array as a string to use in a logging function. I wanted minimal lines and to keep it simple. Using two PHP functions, http_build_query() and str_replace(), and a little fiddling … Continue reading

Posted in Development, PHP | Tagged , , , , , , , , , , , , , , , | Leave a comment

Count Versus Empty

This post is going to explore the reasoning behind using the empty() function over the count() function when doing tests on arrays. When working with any programming language, you are going to do a lot of work with iteration. Looping … Continue reading

Posted in Development, PHP | Tagged , , , , , , , , , , , , , | Leave a comment