Thread: Onwall help
View Single Post
  #3  
Old 02-28-2011, 03:22 PM
TheRuckus TheRuckus is offline
Registered User
TheRuckus's Avatar
Join Date: Jan 2010
Posts: 147
TheRuckus can only hope to improve
Quote:
Originally Posted by fowlplay4 View Post
Modulus (%): Computes the remainder of a division operation. Which is useful for keeping a number within a certain range since it guarantees the number will never be bigger than the number you specify.

PHP Code:
function onCreated() {
  echo(
10 3);
  echo(
12 3);

Ternary (?): (statement ? trueresult : falseresult)

PHP Code:
function onCreated() {
  
temp.result true;
  echo((
temp.result "Yes" "No"));

It's more so for quick and dirty work, beats writing an if statement like this:

PHP Code:
function onCreated() {
  
temp.result true;
  if (
temp.result) {
    echo(
"Yes");
  } else {
    echo(
"No");
  }

When theres a day you don't know how to fix something a hero will rise and become the new manager of zodiac. (not like its gonna happend.)
__________________


Tince thinks hes god.
Reply With Quote