mzanimephp wrote:Wow, thats insane!
Of course, I have questions...
Whats the difference between this operator => and this one? -> (In plain english)
=> is used for defining associative array elements. The string on the left is the array element key, and the value on the right is the value assigned to that key.
-> is used in object-oriented code as the "pathname separator" to specify object/class attributes or methods, such as:
$obj = new MyClass();
$result = $obj->myMethod(); // executes the method myMethod() defined in class MyClass as instantiated in object $obj.
I assume this operator += means "added to, or equal"
It means set the value of the variable on the left side to its current value plus the value of the expression on the right side. The following two commands are functionally equivalent:
$var = $var + 10;
$var += 10;
I don't like how this part looks, it's so cryptic... printf('$%.2f', $rates['web']);
See [man]printf[/man] or [man]sprintf[/man] for a full description with all the options. In this case, it means print the string '$%.2f', but replace the place-holder %.2f with the value of $rates['web'], with exactly two decimal places.