Monthly Archives: October 2011

PHP Text Color

When writing scripts to sort through large amounts of data, using color to highlight certain output values can be quite useful. If you are outputing to a browser, this is quite easy; you just use html colors (i.e. <span style=”color: … Continue reading

Posted in PHP | Tagged , , , , , , , | Leave a comment

How to Turn a Doctrine_Collection of Objects into a PHP Array

Hint: toArray() is probably not what you’re looking for. ->toArray() Most programmers would probably assume that calling toArray() on the collection would simply place all the objects into an array. While toArray() does do that, it also converts the objects … Continue reading

Posted in Uncategorized | 4 Comments

Doing Recursion in PHP Anonymous Functions / Closures

Common Problems If you’re trying to use a PHP anonymous function recursively and are having trouble, you might be seeing an error like Notice: Undefined variable: fooFunction in /yourScript.php on line 10 This error can result from one of [at … Continue reading

Posted in PHP | Tagged , , | Leave a comment

Use fputcsv to Make CSV Output to Browser or Variable

PHP has plenty of handy helper functions to take advantage of, but once in a while there seems to be obvious functionality missing. For example, fputcsv is a handy function that allows you to create a CSV file from an … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Symfony Project Returns Apache 404

When copying a Symfony Project to a new server I noticed a problem; when I used the dev environment, everything worked fine, but when I used prod, I received a 404. They key was that the 404 came from apache … Continue reading

Posted in Linux, Symfony | Tagged , , , | Leave a comment

Making Symfony Routes Available in Tasks

By default symfony puts the routing.yml file in an application’s config folder.  This is nice if you wish to have separate routing for separate apps.  However, if you only have one app, it greatly simplifies things to place this file … Continue reading

Posted in 1.4, Symfony | Tagged , , , , | Leave a comment

Using a script to access Netsuite Report Data

So far, it seems that Netsuite Webservices has little support for fetching reports (correct me if I am wrong, but I didn’t see anything in the schema browser). However, there is still an easy way to access this data. Netsuite … Continue reading

Posted in Netsuite PHPToolkit | Tagged , , , , | 1 Comment