[nycphp-talk] Learning to use OOP in PHP
Brian O'Connor
gatzby3jr at gmail.com
Tue Mar 22 20:24:56 EST 2005
Hello.
I've been using PHP for about ~1 year now. and I feel I should be
learning to use OOP to it's full capability in PHP. I've been playing
with it a little bit, but the only real way I know how to use it for
my purposes is to double query the database, once to get the ID, then
do a while loop and create an instance of the class from that ID
given. From there I would go and query the information within the
class, and have method's to return certain pieces of information so
that I wouldn't have the code on the actual page. I'm aware that
pretty much anything you want to do on a webpage can be done without
OOP, and strictly on the page, but I find myself writing a lot of the
same code that has the exact same purpose on another page. I'd like
to be able to keep my code organized, as well as be able to create a
website for someone and have someone else maintain it with ease. My
Brother was attempting to explain to me how to do OOP without double
querying the database, but it was over the phone and it was a bit more
complicated that way than with some text in front of me. What I'm
looking for are some tips on how to use it properly, or some
recommended books / websites that explain this. Thanks in advance.
--
Brian O'Connor
More information about the talk
mailing list