Home
PHP
Chart
Class
Components
Cookie Session
Data Structure
Data Type
Date
Design Patterns
Development
DNS
Email
File Directory
Form
Functions
Graphics Image
HTML
Language Basics
Login Authentication
Math
MySQL Database
Network
Operator
PDF
Reflection
Statement
String
Utility Function
Web Services SOAP WSDL
XML
Using the autodecrement operator : Arithmetic Operators « Operator « PHP
PHP
Operator
Arithmetic Operators
Using the autodecrement operator
<?php $counter=1; $counter--; echo $counter ?>
Related examples in the same category
1.
Arithmetic Operators
2.
Arithmetical Operators
3.
An example of PHP's automatic type conversion is the addition operator '+'.
4.
Changing the default precedence using parentheses
5.
Increment/decrement Operators
6.
Incrementing and decrementing
7.
Using the negation operator
8.
Using pre- and postincrement
9.
Using autoincrement to add to a variable
10.
Postfix and Prefix Operators summary table
11.
Peculiarities of the ++ and -- Operators
12.
postfix and prefix increment operators also work on letter values
13.
Postfix and Prefix Operators in Action
14.
Calculation Results for Postfix and Prefix Operators
15.
Shorthand Operators summary table
16.
Variables Are Assigned by Value
17.
Using Assignment Operators