Jump to content

Recommended Posts

Hello All

 

this is my first topic in this forum

 

i need help about learning php

 

i am trying to learn php from 2 years ago

 

at first i did a course of learning php from a american francise company in our country

 

but i couldn't learn properly

 

then i skipped php for 1.5 years & again start a new course of learning php in the training centre

 

still i couldn't learn properly

 

i did try reading php ebooks , .PHP & MySQL(Novice to Ninja)

 

but my main problem is when i see a lots  of code , i feel like i can't do it

 

still i want to be a good coder

 

can u help me with any solution please or suggestion

 

what i should do  ?

 

thanks for your time

Link to comment
https://forums.phpfreaks.com/topic/284954-need-help-for-learning-php/
Share on other sites

Create simple things. Read from a text file. Read from a database. Store things in sessions. Change that so that everything you write to a session is stored in the database.

 

Make a form with some input fields and submit it, then add, subtract, divide, or multiply the input and display it on screen.

 

Get your hands dirty. It's the only way you learn how to program.

Edited by ignace

Create simple things. Read from a text file. Read from a database. Store things in sessions. Change that so that everything you write to a session is stored in the database.

 

Make a form with some input fields and submit it, then add, subtract, divide, or multiply the input and display it on screen.

 

Get your hands dirty. It's the only way you learn how to program.

 

Thanks bro

 

i will try

As ignace said, start with small things, you don't want to overwhelm yourself. Pick a concept, technique, or technology and learn it. Then you can learn how they work together.

 

For some ideas, here's a list of easy to hard projects:

http://forums.phpfreaks.com/topic/262327-bored-looking-for-ideas-heres-a-list/

Reading code is important, though; try not to feel overwhelmed.

 

Grab a section of code, copy it into your IDE/editor, and add comments as you figure out what each line is doing.

 

Then grab the next section and do the same.

 

Once you've got a big section annotated in this way, go back and read over all *your* comments. It can be very enlightening and helpful.

since my question is kinda related to this, ill post here. if by chance i shouln'dt have, pls tell me. thank you.

 

im currently a novice on php and other web developing languages (i.e. php, html, javascript etc...). Im studying php since I need this for my thesis (my teacher required this ). I've read that before I study php I have to have some knowledge in html and javascript (which i don't have ) so the question is:

 

is there a way (or a website specifically ) where even a complete begginer like me can understand?

 

I'm trying to study html right now (since most of the tutorials I found about php had html codes that I don't get) but im not sure if im can add javascript too ( studying 3 programming languages at the same time would be quite the stress ).

 

any help is appreciated. thank you!

Well, HTML isn't a programming language.  It doesn't have any brains, as it were.  It's just text markup (indeed, that's why it's called Hypertext Markup Language).  HTML is incredibly simple, with the hardest thing figuring out the difference between inline and block elements.  CSS is a bit more complicated (mostly with the way it handles element positioning), but the basics are simple enough.

 

PHP isn't reliant on JavaScript (or vice versa).  In fact, PHP and JavaScript live in two different environments.  PHP is executed on the server, whereas JS is executed in the browser.  Because of this crucial difference, you'll need to be familiar with the HTTP request cycle, which is basically:

 

Request to server --> Server side processing (PHP, or some other language) --> Response to user (output, which would include HTML, JavaScript, images, etc.)

 

That said, JavaScript has become increasingly important to learn because it's what makes pages interactive.  Think about what Google does.  All of the data is on their servers, but they use JavaScript to request that data and update the screen seamlessly.  So, at the very least, you'll want to become familiar with the basics there as well if you actually want to become a developer.  If you're just doing an assignment, think of JS as extra credit.  It's not necessary in the process of creating dynamic sites, but it can add that extra layer of polish that shows that you're willing to put forth extra effort.

 

Regarding resources, I'm not sure of any website that would meet my standards.  Someone somewhere will no doubt mention w3schools, but that's a bad idea (see the w3fools link in my signature for the reason why).  The vast majority of PHP tutorials available suck.  They're either outdated, or they show exactly the wrong way to do things (like using 'global' everywhere).  The best introductory resource I've found is Larry Ullman's Visual Quickstart Guide (http://www.amazon.com/PHP-MySQL-Dynamic-Web-Sites/dp/0321784073/ref=sr_1_1?s=books&ie=UTF8&qid=1388598161&sr=1-1&keywords=larry+ullman).  Easy to read, lots of pictures showing the exact code in action, and no glaring errors.  Yeah, it's a book, which costs money, but it's the best introductory resource available, IMO.

 

Luckily, there is a good, free online resource for front end (HTML, CSS, JavaScript) stuff.  The Mozilla Developer Network (https://developer.mozilla.org/en-US/docs/Webwill give you just about everything you need there.  It's by far the best resource available for the basics, as it's written/maintained by the people who make the Firefox web browser, which is also the same group that created JavaScript to begin with.  So, you'll be getting the info straight from the source.

  • 2 weeks later...

Agree with KevinM1, Larry Ullman's PHP tutorial is the best book i've ever read for beginner. I'm newbie in PHP programming too, I don't have any experience about programming. If you want an interactive website to learn about HTML, JavaScript, CSS, PHP, etc for beginner go here http://www.codecademy.com/

PHP programming is not complicated.  Web development is complicated, and PHP is highly focused on solving web development problems. 

 

As you stated, you need to learn a lot of things:   

 

  • How does the WWW work?
  • How does the internet work?
  • What is HTML?
  • What is CSS?
  • What is javascript?  Why, when where do you need javascript?
  • What is HTTP and what do I need to know about it?
  • What features do browsers offer, and why/when are the used?  (Cookies, HTML5)
  • How do I setup the various servers and modules needed in order to code specific things (unix/linux, command lines, etc.)

All of this before you even can really turn the corner on what PHP does, or get into data persistence (files, relational database and document stores, caches, etc).

 

Based on what you've said, I would highly recommend, that you learn html + css to the point that you can create and style a nice web page.  This includes building forms using all the various form input types.  The good news is that there are so many free resources available not to mention places like codeacademy, all for free, and you don't need anything but a browser and a text editor to study and practice.

 

After that you can either proceed to javascript, or start in on PHP.  Personally, I'd recommend adding javascript, at least to the degree that you can do some basics.  Learning jquery around this time would not be a bad thing either.

 

Once you can create web pages, with HTML, css and javascript, you're ready for PHP.  Trying to dive into PHP without those foundation elements, can certainly be extremely confusing, because you don't have any context for many of the features of PHP.

 

Also, all the browsers have tools now like firebug that let you look into the workings of existing web pages, or the ones you create, so that you can debug javascript, look at the DOM, check out the HTTP requests.  I would have killed for tools like these when I was starting out in this field. 

+1 for Mr. Ullman ... plus, he hangs on the PHP mailing lists, is a very friendly, helpful guy (although very busy), and grew up "around here" (that is, near where I live, or same state, anyway).

His book got me started and ultimately helped provide a new career.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.