1. Trang chủ
  2. » Giáo án - Bài giảng

Lecture Web technologies and programming – Lecture 23: Introduction to PHP (Part 2) - TRƯỜNG CÁN BỘ QUẢN LÝ GIÁO DỤC THÀNH PHỐ HỒ CHÍ MINH

20 14 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 20
Dung lượng 534 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

17 Variable Declared Incremented Before Display Incremented After Display Displaying Incremented Value.. 19[r]

Trang 1

1

Trang 2

2

Trang 3

Setting the environment

Local

Global

Static

Type Determination

3

Trang 4

Operators in PHP

4

Trang 5

Operators are used to perform operations on

variables and values.

PHP divides the operators in the following groups :

Trang 6

Arithmetic Operators:

with numeric values to perform common

subtraction, multiplication etc

+, - ,*, /, %, **

Trang 7

Assignment Operators:

used with numeric values to write a value

to a variable.

is "=" It means that the left operand gets set to the value of the assignment expression on the right.

=

Trang 8

8

Trang 9

designed for strings

, .=

$a=“abcd”.”efgh”; $a=abcdefgh

$a.=“ijk”; $a=abcdefghijk

Trang 10

Operators:

Trang 11

First

Variable

Second Variable

Concatenation

Using =

Trang 12

12

Trang 13

Adds $b in $a Concatenates $b with

$a

Trang 14

14

Trang 15

The PHP increment operators are used

to increment a variable's value.

The PHP decrement operators are used

to decrement a variable's value.

++ ,

$b=$a++

$b=++$a

Trang 16

16

Trang 17

Variable Declared Incremented Before Display

Incremented After Display

Displaying Incremented Value

Trang 18

18

Trang 19

combine conditional statements

AND, OR, NOT, XOR

&&, ||, !

Trang 20

Logical Operators:

Ngày đăng: 01/04/2021, 16:12

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w