apparition.Designs | version 2 | anything you can imagine is real

.Welcome to apparition.Designs [apparitiondesigns.com]

Hello, we are currently under development and are trying to get all our content up as soon as possible. We hope to get the site up, tweaked, and bug-free A.S.A.P. If you have any questions or comments on what you have (or havent) seen so far, feel free to email me at StratzSfear@apparitionDesigns.com

 
 

.before the basics...

Assignment Operators

Operator

Example

Explanation

=

$cow = "moo"

This does not mean "equal to"; This is assigning a value (moo) to the variable ($cow)
$cow now represents moo.

.=

$cow .= ", says the cow"

This adds ", says the cow" on to the end of whatever the variable equaled before. (you may also use math operators instead of the ".")

Arithmetic (Math) Operators

Operator/Example

Name

Explanation

$a + $b

Addition

Sum of $a and $b.

$a - $b

Subtraction

Difference of $a and $b.

$a * $b

Multiplication

Product of $a and $b.

$a / $b

Division

Quotient of $a and $b.

$a % $b

Modulus

Remainder of $a divided by $b.

Comparison Operators

Operator/Example

Name

Explanation

$a == $b

Equal

TRUE if $a is equal to $b.

$a === $b

Identical

TRUE if $a is equal to $b, and they are of the same type. (PHP 4 only)

$a != $b

Not equal

TRUE if $a is not equal to $b.

$a <> $b

Not equal

TRUE if $a is not equal to $b.

$a !== $b

Not identical

TRUE if $a is not equal to $b, or they are not of the same type. (PHP 4 only)

$a < $b

Less than

TRUE if $a is strictly less than $b.

$a > $b

Greater than

TRUE if $a is strictly greater than $b.

$a <= $b

Less than or equal to

TRUE if $a is less than or equal to $b.

$a >= $b

Greater than or equal to

TRUE if $a is greater than or equal to $b.

1 < $a < 3

Between

TRUE if $a is strictly between the two values on either side.

1 <= $a <= 3

Between

RUE if $a is between or equal to the two values on either side.

Logical Operators

Operator/Example

Name

Explanation

$a and $b

And

TRUE if both $a and $b are TRUE.

$a or $b

Or

TRUE if either $a or $b or both are TRUE.

$a xor $b

Xor

TRUE if either $a or $b is TRUE, but not both.

! $a

Not

TRUE if $a is not TRUE.

$a && $b

And

TRUE if both $a and $b are TRUE.

$a || $b

Or

TRUE if either $a or $b or both are TRUE.

$a ^^ $b

Xor

TRUE if either $a or $b is TRUE, but not both.

Comments

Code

Example

Explanation

//

//This explains what the code says...

This way of commenting is good for only one line... anything after the "//" will not be parsed.

/* */

/* this will all
be commented
out */

Using this way of commenting, you can comment out multiple lines of coding.

Escape chars

Code

Meaning

Explanation

\n

linefeed

This pretty much is the PHP equivalent to <br> in html

\t

horizontal tab

Does what it says, add a space before the content you add after

\"

double quote

This is how you add a quote if you want it to show up as text, otherwise its treated as PHP code.

\$

dollar sign

This is how you show a dollar sign if you want it to be test, otherwise its treated as PHP code.