Best way to practice?

Associate
Joined
29 Apr 2006
Posts
1,456
Hey
I started learning PHP recently, so far I covered the basics of:

variables
numbers
floats
strings + functions
arrays + functions
Booleans
typecasting

and some other basic topics.

I have full understanding of the above but when it comes to creating a new blank PHP page and writing code into it, i am getting bit lost and unsure on what to do (no previous experience obviously), so i am in need for a good way of practicing the new things that I learn.

Thanks :)
 
Give yourself a task, or set yourself an application to build and complete it start to finish...

E.g. you could start by working on a password protected php login system with a mysql database backend for a website :)
 
How did you learn? If you don't have any good books, i'd suggest getting a couple. They often use real-world examples of little applications that will put what you've learned into useful practice.

If not, as daz suggests, use a couple of common tasks (ones that you're familiar with that you know exactly how they should work so you have clear goals) and set about designing (important!) and building them.

Good luck!
 
I had to make the switch from classic ASP to PHP a couple of months ago.

I came across a load of videos covering the basics and then a series covering a e-commerce store from start to finish (including how to link to various payments gateways) - there are loads of them all about 20 mins each.

I found more info went in than reading a book or even looking at examples on the tinterweb. I also remember learning quite a lot taking wordpress apart and finding out how it works.
 
I got this.

done chapter 5: (Few times each vid + going through the exercise files over and over)
5. Exploring Data Types
Variables
Strings
String functions
Numbers pt. 1: Integers
Numbers pt. 2: Floating points
Arrays
Array functions
Booleans and NULL
Type switching and casting
Constants
and going through chapter 6 just now;

6. Control Structures
Pt. 1: Logical Expressions
If statements
Else and elseif statements
Logical operators
Switch statements

?
 
you need an algorithm.

then code the procedures.

i.e.

say you want to search a db for a user in put value and display the db table in blue but the result in red if it matches the user in put.

So literally type this:
PHP:
// get user input

// search db and return rows

// print rows in blue

// if row matches user input print in red

// end

then start coding up each peice of the program...
 
Back
Top Bottom