-
Pet Projects
Tag Archives: PHP
Here is a quick way to output/stream/download a CSV file from your database using CakePHP. For simplicity, I have placed everything in the controller. Not good practice but it quickly does the job. <?php class UsersController extends AppController { … Continue reading
I got an email from Packt Publishing to review a book that they will be releasing very soon (March 2010?). The book is about OpenX. In all honesty, I have not even tried to use OpenX Ad Server yet. Still, … Continue reading
Here is a tutorial on how to handle file uploads with Zend_File_Transfer. Like so many of the other powerful components made available through the Zend Framework, the Zend_File_Transfer component is intended to make your life much easier when it comes … Continue reading
I have just spent an hour an a half trying to figure out why the newline character “n” caused an error in my Javascript. I am posting this because I have been unsuccessful in finding a solution to this problem. … Continue reading
This short tutorial assumes that you are using Zend_Framework 1.8, the latest stable release as of this post. To learn more about View Helpers, the Zend Framework Manual as an entire page for it found here. First, you need to … Continue reading
Earlier at home, I recently encountered this problem when I was using Zend_Service_Twitter to get the rateLimitStatus of API calls. One of the values returned by the successful API call contained a dash(-); I needed to do something like this … Continue reading
I had to learn the hard way. On my Mac I have MAMP installed. MAMP great piece of software that installs Apache, MySQL and PHP. It makes everything easy. As of this post, the PHP included in MAMP is PHP … Continue reading
I had a scenario at work today that need me to use a variable in an object and call it like I would when using keys in an array. Like when I have an array, I would do something like … Continue reading
First off, from the PHP.net Manual, the ‘W’ inside the date() function returns the week number for a year. Week ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0) Example: 42 (the 42nd week in the … Continue reading
I rarely post articles like these. But this one will hit a spot on some developers. I personally think that arrogance is a dangerous trait for a programmer/developer. I would not want to work with someone who thinks so highly … Continue reading