After filtering an array indices are removed from the array resulting in errors while trying to loop over the index. Therefore, one needs to reset then index so that it follows a logical order (1,2,3..) instead of (1,3,6,7…). Luckily, PHP doesn’t have a defined method to do this, but it [...]
Currently Browsing
April, 2010
Using the array_filter function within a class
When using the array_filter method in PHP I attempted to make my callback function a private method within my class. Upon trying to execute my script I recieved an error telling my that I had not defined a proper call back method. After searching for several minutes I came across this snippet of code and I hope it works for you as well.
Downfalls of the Agile Development Cycle
The Agile development methodology is supposed to be one of the great new advances in software development. Traditional waterfall techniques provide slower production time and are more restricted to what the initial design plans are. Agile was supposed to allow for quick turn around and delivered results within weeks rather [...]
Simple Search Engine PHP/MySQL
Having a search engine on your site can be a great thing. Many times users prefer searching rather than browsing in order to find something on your site. Google does offer site search that will index your site, but I like many other people prefer to keep things in-house so [...]
Simple Search Relevance in mySQL
Many times when one wants to build their own search engine, he or she wishes to sort the results by relevancy. MySQL provides some useful syntax to make this possible. Below is a short code snippet to a simple relevance calculation and order by it. ORDER BY ( ( CASE [...]
Creating a Home Recording Studio
Everyone wants to be a rock star, party like one, and of course make money while doing it. The truth is a lot of us will never be able to afford to buy the studio time that will get us there. In recent years though the pains of recording an [...]