Page 1 of 1

Category tags (beginner's question)

Posted: Sat Nov 25, 2006 6:44 pm
by haptic
Hi, as I stated i'm pretty much a beginner at php and mySQL. I'm developing my first "web 2.0" site and its coming along well. But I've run into a little confusion on how to add tag clouds (like in del.icio.us).

I'm building a portfolio for my work and since the only categories are "print","identity","web","interactive","contact","recent" (and they typically will belong in only 1-3 categories), I took a shortcut and made it so when the project is submitted there are a static number of 4 categories it can be placed in (cat1, cat2, cat3, cat4), if it doesn't need 4 categories the value is set to 0; otherwise it is a value 1-4 which correlates to a category table in my database.

my previous category query dumps the categories into an array called $catRow so I thought echoing $catRow[$projRow[cat1]] would echo back the name of the category row corresponding to the value of the first category of the projRow (array for projects). Instead it echo's nothing, are array variables inside while statements not accessible outside of the while statement?



what is the best way of adding this 'tag' functionality? or what exactly am I doing wrong?

thanks!

to see what I am attempting to do go here: http://www.workofkylephillips.com/test.php