- PHP code can be embeded directly within an HTML file.
- A PHP file will usually have the extension .php.
- Comment:
- Multi-line block comments /* */
- Single-line comments // or #
PHP Tag Example
Include PHP files
PHP $Variables and Data Types
- Variables in PHP are dynamically typed.
- The PHP engine makes a best guess as to the intended type based on what it is being assigned.
- A variable can be assigned different data types over time.
- Variable names are case sensitive.
- Boolean: A logical true or false value
- Integer: whole numbers
- Float: Decimal numbers
- String: Letters
- Array: A collection of data of any type
- Object: Instance of classes
Writing to Output: echo
We can use echo() to output something.
'Web Programming π > Back-End π₯·π»' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
PHP Exercise: GuessGame (0) | 2023.04.25 |
---|---|
PHP Exercise: popcorn bill (0) | 2023.04.25 |
PHP Form (0) | 2023.04.25 |
PHP function & Array (0) | 2023.04.25 |
PHP Setup (0) | 2023.04.13 |