One man's voice Thoughts, rants and commentary of a simple man

28Nov/110

Simple PHP table maker

A little while ago I was in need of a way to take tab separated data sets and make HTML tables out of them cleanly. Mostly this was from data copied from a spreadsheet, but sometimes copying from web pages or even text documents has brought this need up for me. So in keeping with my mantra of "Why not write a program to do that?" I decided to write a simple HTML table maker that will take in tab separated, structured data and return an HTML table from it, complete with column headings, a caption and a summary (sidenote: I know that table summaries are being deprecated... still, I included it because at the moment they are still in use for pre-HTML5 markup).

So without further ado, I bring you my simple HTML table maker. It isn't the most robust thing in the world, but it is still pretty neat. Plus? It totally serves my purpose to the tee. So if you don't like it, why not gank the code for it and make it better?

20May/110

Simple PHP Class generator

Someone on the Professional PHP Group asked the question yesterday about whether Dreamweaver has a utility to write setters and getters to your PHP classes for you. I know that ZendStudio has this feature and I am pretty sure that NetBeans has it as well.

But as I thought about this, I thought "How cool would it be to be able to take a list of PHP properties and build a class out of that list complete with your getters and setters?". That's when my inner nerd took over and I created a very simple PHP Class Generator.

It is not the most robust tool in the world, but if you are looking for a quick way to build out a class of getters and setters from a simple list of variables, this little tool might be right up your alley. I'd encourage you to play with it and see if it can help you. If it does, tell me about it in the comments.

Oh yeah, a major thank you goes out to Jason Memory of Full Throttle Web Solutions for his help and wizardry in all things regex.