PHP - Operators
Which of the following is the correct way to increment a variable
$count by 1 in PHP?$count by 1 in PHP?+= adds a value to the variable and assigns the result back.=+ which is invalid. $count = 1+; has misplaced plus sign. $count ++=; is invalid syntax. Only $count += 1; is correct.+= to add and assign [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions