Why use OOP?


Posted on 16th Feb 2014 07:03 pm by admin

Can someone explain to me why I should use OOP instead of procedure based code.

Im building a shopping cart and i created and Item object already and using it to hold data for each item. But this Object just has properties. I mean what methods could there possibly be for an item.

Why would I need a Cart object either? There will never be more than 1 instance of the cart running. So what are the advantages to putting all my functions inside of a class?

Thanks, and sorry if your offended by this, im trying to go OOP i just don't see why yet.

217 Like 8 Dislike
Previous php-forum Next php-forum
Other php-forum

Why is the logic of this simple code not working?
Hey, I'm trying to determine if a table already exists in mysql, but doing a query first with mysql_

Please help understand this code
I noticed the index page on my site was modified this morning and found this code inserted at the bo

Output Buffering question
Hi all,

I've been trying to wrap my head around output buffering. So far I've found tons of

HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc sen

simple ping code
been searchin the site/web and found code thats simple but doesnt work.

I have a personal we

How to submit a form to the same page?
I have a table containing information about books in my library and this table has the following col

Getting PHP to ammended the selected in option field
Hey Guys

thanks for everyones help so far. This site and its users are oozing awesomness.

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

help with Get_
ok some how this is not working i am not sure what i am doing wrong here but what this does is when

do while conditions
i want to display 6 images in a 2x3 table
now what would be the correct logic to
count that th

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash