PHP Expert for Hire

Saturday , 16, June 2007 Leave a comment

Perhaps you weren’t aware, but I’m now an expert in php. By expert, of course, I mean I know how to use includes and I wrote some sweet code in php and now I’m calling myself an expert. But seriously, php is rad. I feel like someone who just started listening to the Shins when Garden State came out. Like this is rad, how come it took me a billion years to figure this out?

I’ve been working on a website for a film- Indestructible. I won’t spoil it, well… I can’t spoil it, because I still haven’t seen it. But check out the site. Actually, as I post this, the site I’ve written isn’t published yet, but I’m sure I’ll link to it again when it’s up. I had to redo the site like 5 times. I originally did it all in regular html, then Colin suggested I do it in PHP. So I did. Then Colin pointed out that I coded it like a weirdo, so I had to completely re-do it. But it wasn’t that bad. I still want to learn about XML, even though I don’t really know what it’s for, but that’s for another day.

So… yeah. Here’s some of the code that I’m more proud of, cause I’m a geek, and I don’t think this is terrible. This code creates a bar of 8 random images from a selection of 64:

<?php
for ( $counter = 1; $counter <= 8; $counter += 1) {
$images=”<td height=\”50\” width=\”97\”><img height=\”50\” width=\”90\” src=\”images/random/”;
$images.=rand(1,64);
$images.=”.jpg\”></td>”;
echo $images;
}
?>

What’s the best part about this code? Not only is it totally sweet, BUT if you cut and paste it into AIM, it finds some sweet emoticons in the syntax:

my-code.png

So that’s pretty fantastic. (Now that I’ve published my code, I’m a little embarrassed. What if some all-star programmer sees it and thinks less of me cause it’s sloppy and semi-retarded?)