This is my first php program!


String Concatenation Operator



Download 6,9 Mb.
Pdf ko'rish
bet31/69
Sana26.02.2022
Hajmi6,9 Mb.
#471647
1   ...   27   28   29   30   31   32   33   34   ...   69
Bog'liq
PHP

String Concatenation Operator
Manipulating strings is such a core part of PHP applications that PHP has a separate
string concatenation operator (
.
). The concatenation operator appends the right-
hand operand to the lefthand operand and returns the resulting string. Operands are
first converted to strings, if necessary. For example:
$n = 5;
$s = 'There were ' . $n . ' ducks.';
// $s is 'There were 5 ducks'
,ch02.15294 Page 38 Wednesday, March 13, 2002 11:42 AM


This is the Title of the Book, eMatter Edition
Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.
Expressions and Operators
|
39
Autoincrement and Autodecrement Operators
In programming, one of the most common operations is to increase or decrease the
value of a variable by one. The unary autoincrement (
++
) and autodecrement (
––
)
operators provide shortcuts for these common operations. These operators are
unique in that they work only on variables; the operators change their operands’ val-
ues as well as returning a value.
There are two ways to use autoincrement or autodecrement in expressions. If you
put the operator in front of the operand, it returns the new value of the operand
(incremented or decremented). If you put the operator after the operand, it returns
the original value of the operand (before the increment or decrement). Table 2-5 lists
the different operations.
These operators can be applied to strings as well as numbers. Incrementing an alpha-
betic character turns it into the next letter in the alphabet. As illustrated in Table 2-6,
incrementing
"z"
or
"Z"
wraps it back to
"a"
or
"Z"
and increments the previous
character by one, as though the characters were in a base-26 number system.

Download 6,9 Mb.

Do'stlaringiz bilan baham:
1   ...   27   28   29   30   31   32   33   34   ...   69




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish