Operators | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1


Where can we use prefix and postfix operator in real life entities

11th Nov 2020, 4:50 AM
Nandini Reddy
3 ответов
It Depends some time you want a variable to be incremented in a loop you could use the prefix example //genrating a new user name $username= $POST["username"]; for ($i=0;i <$username.length(); $i++){ $username+=$i; }
11th Nov 2020, 5:20 AM
George S Mulbah II
George S Mulbah II - avatar
11th Nov 2020, 5:21 AM
Nandini Reddy
- 2
George S Mulbah Did you check the example code?
11th Nov 2020, 7:01 AM