jtmorris/phpframework — Issue #4: A Lot of Removing of Trailing Character Inefficiently
Author: jtmorris
Created: 2012-01-07 04:35:34+00:00
State: open
Labels: Potential Improvements

Spread throughout the code is the following line used repeatedly

$some_string = substr($some_string, 0, -1);

Most often is when constructing SQL queries with loops and a comma needs to be stripped off the end.

Should create a single function that is called that does this. It would make the code easier to read (if function is named well), and allow for easy modification. Never copy and paste code!