Helper Classes

PHP function to create a recursive file list

Posted by on December 22, 2009 at 7:29 pm

Just a quick hookup I ran into the problem of creating a recursive file list in PHP and thought i might share my solution. function recursiveFileList ($dir) { $ret = array(); $d = dir($dir); while (false !== ($entry = $d->read())) { if (substr($entry,0,1) == “.”) { } elseif (is_dir($rep = $dir.$entry.”/”)) { $fi = recursiveFileList($rep); [...]

Way out of the cruelity of automatic generated HTML code

Posted by on August 26, 2009 at 9:51 am

You love it when code looks nice? You seek an error in your html code but your script produces endless lines which are hardly readable at all? To me code has a beauty in itself and i think even an automatic generated site should have a readable sourcecode in it.  Today i present you with [...]

Nice OsCommerce URLs without huge changes

Posted by on August 25, 2009 at 2:00 am

Ok i agree i was fed up with it. I tried a few contributions which should improve url readability and it didn’t really work. Either it didn’t work at all or the urls looked crappy. So reminded myself that a few month ago i wrote a wrapper to provide conenido with SEO friendly urls. Share [...]

CyCSVReader Class – Just a simple CSV Reader

Posted by on August 18, 2009 at 11:26 am

This is something which i need on a regular base. Parsing simple CSV Files created by Microsoft Excel. The class loads a file and allows to get line by line of the file as an array named after the fields which were defined in the first line of the file. Share on Facebook