PHP is quite a simple langage with roots in C and Perl, yet it looks like Java.
if you have ever written in the BASIC language,
you will have use the $ to terminate variable names to denote them as things.
In PHP, however, you must place a $ in front of all variables.
String concatenatin uses the period(.) operatorb to append one string of characters to another.
you can append one string to another using .= like this
$bulletin .= $newsflash;
If you had used double quotes, PHP would have attempted to evaluate $variable as a variable.
PHP alse offers a multiline sequence using the <<< operator,
commnly referred to as here-document or heredoc for short.
echo <<< _END This is one. This is two. This is three. _END;
This output everything between the two _END tags as if it were a double quoted string.
PHP is a very loosely typed langage. This means that variables do not have to be declared before they are used,
and that PHP always converts variables to the type required by their context when they are accessed.
In practice, what this all means is that you dont have to worry too much about your variable types.
The main two things you have to remember about constants are that they must not be prefaced with a $(as with regular variables),
and that you can define them only uing the define function like this.
I read it..
- 作者: Robin Nixon
- 出版社/メーカー: OReilly Media
- 発売日: 2012/08/13
- メディア: Kindle版
- クリック: 1回
Thanks all programming technologies in the world
Because this have my life enriched.