: This article mainly introduces some experiences with PHP semicolons and commas. For more information about PHP tutorials, see. The semicolon indicates that the statement has ended,
A comma (,) indicates that a part of a statement ends.
For example
$ Myarray = array (
'Girl '=> array (
'Name' => 'hahaha ',
'Age' => '19 ',
'Hobby' => 'fuck ',
),
'Boys' => array (
'Name' => 'my ',
'Age' => '22 ',
'Hobby' => 'fuck ',
),
);
Foreach ($ myarray as $ gkey => $ gvalue ){
Echo $ gkey. '=> '.'
';
Foreach ($ gvalue as $ key => $ value ){
Echo $ key. '=>'. $ value .'
';
}
}
This is to use foreach to traverse the two-dimensional array. after the girl finishes, it finds that the statement is not over, so it is still used,
End with; after the array is complete.
The above introduces some experiences of PHP semicolons and commas for beginners, including some content, and hope to help those who are interested in PHP tutorials.