
Computer is invented to process data.
To better handle data, data has been divided into several types.
As a programmer, whenever you see the word data, ask two questions: data type and data value.
PHP has offered us a basket to store values. The basket is called variable.
You will learn how to create a variable and how to assign value to it.
when it comes to handling variable, single quotes and double quotes behave differently.
A new data type: NULL.
Assigning NULL to a variable can empty that variable.
you might think value assignment between variables are simple, but there might be things you not know.
Pass value by reference.
The ampersand can tie two variables to one value.
this is the end of the yellow belt, before you move on, you might want to slow things down a little bit and do a review of what you have learnt so far.
A review of what you have learnt in the Yellow Belt Lessons. and also hope you like the music.
A review of what you have learnt in the Yellow Belt Lessons.
The building stone of PHP is expression.
The tool we can use to process data: operator.
Give your program a steering wheel so that it can make decisions.
The IF statement.
How to use it and how it works.
Sometimes the program needs to make decisions based on variable values.
In this case, IF statement is not convenient.
SWITCH statement.
What kind of value will be regarded as FALSE.
Ternary operator.
WHILE statement.
How to let the program do repetitions.
There is another form of WHILE statement: do while.
Another form of LOOP statement: FOR statement
The reason why making web apps using PHP is fast and convenient is because of all the brilliant built-in functions PHP has.
But as new learners, there might be some tricky parts about functions.
Always remember the key in using a function is that you have given each function argument a correct value and most importantly, you have put those values in the correct order.
sometimes, you just have to create your own functions, this lesson will teach you how to do that and how to do that properly.
normally, the value returned by a function is NULL. but sometimes, you need control the returned value because the following operations will depend on that.
the keyword RETURN also means the end. Codes behind it will not be executed. In the future, you will find that RETURN is a brilliant tool and you will use it a lot.
changing variable value is simple, but if you want to do that using a function, things are a little bit more complicated.
inside and outside a function, there are two different worlds. Using the keyword GLOBAL, you can break that wall.
you can set default values to function arguments. But if you want to do that properly, there are some rules you must follow.
Compared with variable, array is much more powerful, In the future, you will probably use more arrays than variables.
array is powerful, but to use it, you must use a tool: the foreach loop statement
callback can be very helpful sometimes, but its concept is a little tricky to understand.
there is no way you can put all your codes in one file. but if you write your codes in different files, how do you allow those files to exchange information with each other???
to achieve cross-file communication, you must be able to locate each file.
you will be using array almost all the time in the future. This means you will constantly do all kinds of manipulations to arrays.
converting array into a string is the fist conversion technique you need to learn.
sometimes, you might need to convert a string into an array, so how to do that?
there is another way to convert a string into an array.
if you need a part of a string, how do you get that???
you will learn something that will make you feel quite powerful: how to use PHP commands to create files.
how to open a file and how to close a file.
if you want to know the content of a file, how do you get that?
if you want to put new contents into a file, how do you do that?
here are four functions you are recommended to learn by yourself. I will teach you how to use those four functions in the next lesson, but for now, try to learn them all by yourself.
this bluebelt demonstration creates file.txt, writes 1 through 0, and uses file_exists, filesize, and unlink to verify existence, measure size, and delete the file.
how do you read a large file efficiently?
how to copy, relocate and rename a file
to manage files, you need to have file folders or directories. so how to create them?
although you are a back-end programmer, there are certain front-end techs you just have to know
Identify a cookie tampering vulnerability in image uploads and demonstrate fixing it by rechecking user identity before every operation and securing the upload process with a scanner.
Watermark a picture using a logo or a text string, convert destination image into a canvas with image create from, and obtain width and height with imagesx and imagesy.
The aim of this course is to help you master web development in the most efficient way.
The content design of this course is inspired by the Jiu Jitsu ranking system.
The whole course includes seven levels: yellow, orange, green, blue, purple, brown and black.
In yellow, orange and green course, considering you just started your PHP study, the learning curve is kept at a rather smooth level.
You will learn the most fundamental coding concepts and simple operations.
In blue belt, things start to change. The learning curve starts to get steep and you will need to combine skills learnt at different times together.
After purple belt, you will start to build programs that can be used in real-life situation. This means you will need to take into consideration safety and efficiency.
We know that everybody forgets. We also know that you have other things going on with your life and your study will be constantly interrupted. Therefore, every time previous knowledge is needed, we will give you a timely review. We believe this can make your study easier and more efficient.
Starting from purple belt, you will learn how to build program that can survive in real life. This means you need to learn more than just coding skills. You will learn program design and safety and efficiency knowledge.