Forget all about OOP and Zend and the big boys.
What i think you should do is research cross language similarities, now this may not be the exact term but ill explain what I mean.
All languages have resemblances but deal with them differently, Such as:
- Type casting
- Logical Statements
- Conditions
- Bitwise operators
- etc..
Now when I talk about Type Casting I am talking about being able to change data types such as Array > Object
, In PHP this can be achieved simply like (object)$array
but you need to fully understand what exactly its doing and where would you need to perform this kind of task.
Now in regards to things like Logical Statements im not just talking about an IF statement here and there, make sure you understand exactly what's happening and what expressions are what, take these examples:
if($a = $b)
if($a == $b)
if($a === $b)
if($a !== $b)
if($a != $b)
if($a < $b)
if($a > $b)
if($a <> $b)
if($a >= $b)
.. And so on
Do you know them all.
Once you are confident in these programming entities then you can proceed to the next level, not just creating a class and using it, but being able to understand how to get the best out of OOP :)
Your programming style at the moment is what we call procedural programming, its basically writing in the way you think, in your mind you think you want to echo something at that point in your application then so you Just echo 'a string'; but as you get more into depth about things you will start to learn things like how HTTP works, and you have to learn that you cant always just send content half way threw your APP, as its error prone and so forth.
By understanding the above fully when you go into the more complex architectures / methods such as OOP, MVC, ORM
etc you would be more equipped so to speak, and you will not just be a script kiddie, not personal..
Also do the folling before you touch a PHP Script again.
- Go buy a chalk board, must be black.
- Set it up in a well lit environment
- Make sure you have a white chalk
- Write on the board 100 times
I will read a book and study, no matter how hard it seems, I will read at least 1 book
Hope this helps you out sir succeed