Skip to content

Instantly share code, notes, and snippets.

@tachymetre
Last active September 3, 2016 12:06
Show Gist options
  • Save tachymetre/b21b5b01caec3eecc7b6 to your computer and use it in GitHub Desktop.
Save tachymetre/b21b5b01caec3eecc7b6 to your computer and use it in GitHub Desktop.
UI-101 (PHP)
  1. Declare a new variable in PHP equal to the number 3 php $number = 3;

  2. How do you check if a variable has been set in PHP? php isset($var);

  3. How do you access a GET requests URL parameter with PHP? php $_GET["urlkey"]

  4. How do you check if a variable has NOT been set in PHP? php !isset($var);

  5. What is the difference between require() and include() when an error is encountered? - include() will raise a warning if it fails, require() will raise a fatal error

  6. What is a simple PHP method to make a cross domain data request? - file_get_contents()

  7. Inside a php function, what param needs to be set in order to access a global variable? php function function_name() {                     global $the_global_var;                 }

@morad7
Copy link

morad7 commented Sep 3, 2016

cool, keep up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment