As with many things in PHP, manipulating strings can be handled a number of ways. I often find myself creating a string of items from an array for presentation on screen or entry into a database. I figured now would be a good time to explore the best method of removing that pesky comma that usually ends up at the end of a looped string (which just so happens to be the wrong way of going about it). The proper way

There is certainly no shortage of this topic on the web. Unfortunately for newer developers, there is no way to tell the good advice from the bad. In this article I will show you the wrong way and the right way. See the proper way.

JavaScript has two built in methods that are very similar in name and function- substring() and substr(). Developers and designers who also use server side languages may find it easy to mix them up, since methods like these have similar names across other languages. Either way, mixing them up might cause bugs with your scripts. For example, see the snippet below that looks almost identical, but yields different results.