Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

nicholas maddren
nicholas maddren
12,793 Points

I still don't feel all that fluent with PHP :(

So I've done the simple PHP course and don't feel all the confident with PHP still. I was struggling with the code challenges and didn't really understand some concepts so I just copy any pasted from the forums. For example I don't feel like I could go and make a blog or an admin panel or anything like that. I know there is another tutorial on enhancing PHP however I've looked and it basically just continues the project. I understood the JavaScript tutorials very well hwoever really am struggling with PHP what could I do to further my knowledge? Any good tutorials? Thanks

6 Answers

Go through the course again is one option. learning programming is all about repetition. If this particular course wasn't too helpful, try some other resources. I personally love using http://www.tutorialspoint.com/php/ This particular site has very simple examples and very thorough explanations. The trick to learning anything is to find out what kind of learner you are, then, to find the resources that have that kind of teaching. good luck!

it sounds as though you may be struggling with the concepts. I had this problem. Javascript and PHP are similar except for the major difference.

PHP is server side processing, loads and runs on the server

Javascipt is client side processing, loads and runs on your PC

PHP can manipulate all the data, just as Javascipt, but it does so "behind the scenes" (server side only) it interprets all the data before it goes to the browser. It can read, write, and manipulate databases on the server but then needs to pass it's information to the browser.

Javascipt on the other hand is a browser interpreter (client side only), it does all of it's processing within the browser, and can manipulate the information directly, and change items on the browser, but it can not change items on the server.

declaring variables are a one-sided process, declaring an X variable on PHP is not translated to X variable on Javascript.

therein, lies the rub (and the difference)

But, PHP can use the GET and POST functions to transfer the data from one to the other via HTML

HTML is kind of the conduit

Once, I got a grasp on the difference and how they inter related, then PHP started becoming clearer for me.

Hope that helps some

Andrew Fox
Andrew Fox
21,899 Points

I've got nothing big to not here BUT I'm fairly certain that you can POST/GET in JavaScript/Jquery using AJAX/HTTP-XML requests and yes it does help to have conditionals set on the server side written in PHP to make sense of what's coming down the pipe.

Philip Cox
Philip Cox
14,818 Points

Hi Nicholas, Learning to code can feel this way sometimes, but don't get disheartened. The key is to keep coding, and in particular, read through code line by line until you do understand what it's doing. Break the code a little and see the effects, then correct it and watch it work again. Sorry to say, but watching and following along with a project or two will not make a person proficient in a language. Even the best coders refer to a source from time to time. I have come to appreciate that knowing is half the battle. As long as you know of a technique you can look it up, understand the code and implement it. We can't be hard on our self's for not memorizing every function, loop and code structure, for the average human it's not really possible. Write code, more code and then more code, and to top it off, write more code.

Keep on trucking :)

J Scott Erickson
J Scott Erickson
11,883 Points

You should take the enhancing course if only for the fact that it explains use of the PDO and separates out some of the model and controller logic in the project in clear ways that help clarify how you might want to set up your own logic in a page.

I'd say this too, as far as learning. You might feel like you don't understand the concepts, but don't copy and paste from the forums to compensate for that. Re-watch the video, ask questions, and above all write your own code. Copying and pasting someone else's code doesn't really help you understand what its doing and why its doing it.

Take what you know and build your own small page in PHP. once you have it done add something, then more. When you get stuck, come here and post in the forums.

Its slow go sometimes, and the first time I got a dev job I felt like I was drowning in a sea of someone else's code that I couldn't piece together in a logical way. But asking for help, and writing my own code, and honestly breaking things over and over again, helped me a lot.

Chris Mitchell
Chris Mitchell
12,719 Points

create a new practice.php file and as you go thru the courses, retype out the code into blocks and use comments in your own words to explain it to yourself later, helps for the quizzes!

nicholas maddren
nicholas maddren
12,793 Points

Thanks guys for the tips! I will definitely start writing down what I learn and not pass a question until I fully understand the concepts :) great advice from you all :)