Hi guys,
I am wondering if anyone can direct me to a tutorial on classes, as the php online manual throws you in at the deep end, and I am struggling.
I want to run a function to pull all blog posts out of the db, the function has the query string as a parameter, which is the id of the post to be displayed.
I want to use the function to set that row out of the while loop to a set of variables, and set $navigation .= <a href="etc to display links to the other posts in the sidebar.
But i have a column in the table for the meta keywords and description, so I need to run the function in the <head> section so I can put the variables into the metas.
That is why I want the function just to set variables so that I can use them in my main page, but this didn't work, so someone suggested classes but I had only ever heard of them before and after looking at the php manual for classes and trying them out for what probably requires a very advanced level of class (I'm in a hurry) I am left with no chance.
If you want to see my function that I have used to display the links and chosen post, but is just echoing the values where I want them, and can't be run in the head, so you can help me, or if there is a good tutorial anywhere then that would be great.
Thanks