Tag Archives: implode

Commas in a PHP For Loop

When generating a string that lists items (e.g. for a MySQL query) with a for-loop in PHP, you often need to add commas after every element except the last one. It may be trivial advice, but instead of having an … Continue reading

Posted in Programming, Web Development | Tagged , , | Leave a comment