Tag Archives: function

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

Good Naming Conventions

Maintaining good naming conventions aren’t just good programming practice, it also shows common courtesy for fellow programmers and yourself. You may be asking yourself “Why is this so important?” Well one day, hopefully, you will be working with other programmers … Continue reading

Posted in Inspiration | 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

My Favorite Variable Dumping Tool

Everyone has a few functions that are their favorite, or one that they keep handy in their toolbox for different situations; this is mine: see_var(). What does see_var() do? It takes any variable that you throw at it and it … Continue reading

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

Your phpinfo()

“Phpinfo” is a nice little script to have saved in your root directory. It’s one simple line, and will tell you lots of information about the system you are working with. It will tell you what configuration files you are … Continue reading

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