+ 1

Operators

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

11th Nov 2020, 4:50 AM
Nandini Reddy
3 Answers
0
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
Sir.George S Mulbah II
Sir.George S Mulbah II - avatar
0
Tq
11th Nov 2020, 5:21 AM
Nandini Reddy
- 2
George S Mulbah Did you check the example code?
11th Nov 2020, 7:01 AM
Ipang