Section 1

Preview this deck

What does the while statement do?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (73)

Section 1

(50 cards)

What does the while statement do?

Front

loops through a block of code if and as long as a specified condition is true

Back

how should a function be named?

Front

so that you can understand what it does by it's name

Back

What is the switch statement used for in PHP?

Front

to perform one of several different actions based on one of several different conditions.

Back

should a variable name contain spaces?

Front

no

Back

There are three different kinds of arrays?

Front

Numeric, associative, and multidimensional

Back

What are associative arrays?

Front

In An associative array, each ID key is associated with a value.

Back

in php how must a variable name start?

Front

A variable name must start with a letter or an underscore _

Back

What is the concatenation operator used for?

Front

to put two string values together.

Back

if a variable name is more than one word how should it be formatted?

Front

with an underscore between words or with the second word capitalized

Back

What kinds of different operators exist?

Front

arithmetic, assignment, comparison, and logical

Back

What is meant by the term strongly typed?

Front

variables have to be defined before they can be used

Back

What is a string variable used for?

Front

A string variable is used to store and manipulate a piece of text.

Back

how is a single line comment made in php?

Front

With //

Back

how must each php code line end?

Front

with a semi colon

Back

in php does a variable need to be declared (created) before being set?

Front

no, php automatically creates the variable and sets it to the correct type.

Back

What is the advantage of arrays?

Front

Instead of having many similar variables, you can store the data as elements in an array.

Back

The correct way of setting a variable in PHP:

Front

$var_name = value;

Back

What is the only string operator in php?

Front

The concatenation operator (.)

Back

Where does the real power in PHP come from?

Front

From over 700 functions

Back

What are looping statements used for?

Front

Looping statements in PHP are used to execute the same block of code a specified number of times.

Back

What does the for statement do?

Front

loops through a block of code a specified number of times

Back

What does the foreach statement do?

Front

loops through a block of code for each element in an array

Back

If you want to select one of many blocks of code to be executed which statement should be used?

Front

switch

Back

how is a php started and ended?

Front

A PHP scripting block always starts with <?php and ends with ?>

Back

what happens if the php file has an html extension instead of PHP?

Front

the php code will not be executed

Back

when should the if else statement be used?

Front

if you want to execute a set of code when a condition is true and another if the condition is not true

Back

What is a function?

Front

A function is a block of code that can be executed whenever we need it.

Back

when should the else if statement be used?

Front

is used with the if...else statement to execute a set of code if one of several condition are true

Back

what is a numeric array?

Front

A numeric array stores each element with a numeric ID key.

Back

if more than one line is to be executed as a result of the if else statement then the lines to be executed should be enclosed in curly braces

Front

...

Back

what are two basic statements to output text with PHP?

Front

echo and print

Back

what are operators used for?

Front

Operators are used to operate on values.

Back

what do all variables start with?

Front

All variables in PHP start with a $ sign symbol.

Back

What does the do..while statement do?

Front

loops through a block of code once, and then repeats the loop as long as a special condition is true

Back

is PHP server side or client side scripting language?

Front

server side

Back

where can a php script be placed in the document?

Front

anywhere

Back

What are variables used for?

Front

Variables are used for storing values, such as numbers, strings or function results, so that they can be used many times in a script.

Back

how is a comment block made?

Front

/ /

Back

What kinds of characters can a variable name contain?

Front

A variable name can only contain alpha-numeric characters and underscores (a-z, A-Z, 0-9, and _ )

Back

What is the primary advantage of using the switch statement?

Front

It avoids avoid long blocks of if..elseif..else code.

Back

What are two different ways numeric array id's can be created?

Front

Manually or automatically

Back

What is a multidimensional array?

Front

In a multidimensional array, each element in the main array can also be an array. And each element in the sub-array can be an array, and so on.

Back

What are the looping statements in PHP?

Front

while, do while , for and foreach

Back

how do all funtions in PHP start?

Front

with the word function

Back

how are elements in an array accessed?

Front

Each element in the array has its own ID so that it can be easily accessed.

Back

what is the purpose of the semi colon?

Front

it is a separator and used to distinguish one set of instructions from another

Back

how are php files returned to the browser?

Front

PHP files are returned to the browser as plain HTML

Back

is PHP strongly or loosely typed?

Front

loosely

Back

What is an Array?

Front

An array can store one or more values in a single variable name.

Back

What does php stand for?

Front

PHP stands for PHP: Hypertext Preprocessor

Back

Section 2

(23 cards)

where is the functions code located?

Front

between the curly braces

Back

What are server side includes?

Front

Server Side Includes (SSI) are used to create functions, headers, footers, or elements that will be reused on multiple pages.

Back

A good way to validate a form on the server

Front

to post the form to itself, instead of jumping to a different page.

Back

What is the most important thing to notice when dealing with HTML forms and PHP?

Front

any form element in an HTML page will automatically be available to your PHP scripts.

Back

What do the include() or require() function allow you to do?

Front

insert the content of a file into a PHP file before the server executes it

Back

What is the disadvantage of using the $_get variable?

Front

the largest variable it can hold is 100 characters

Back

what is the purpose of the $_REQUEST Variable?

Front

The PHP $_REQUEST variable contains the contents of both $_GET, $_POST, and $_COOKIE.

Back

What is the advantage of using the $_get variable?

Front

the page can be bookmarked

Back

What is another way functions can be used?

Front

to return values

Back

How does the include() or require() function handle errors?

Front

The include() function generates a warning (but the script will continue execution) while the require() function generates a fatal error (and the script execution will stop after the error).

Back

What are the advanteages to using $_POST

Front

Information sent from a form with the POST method is invisible to others and has no limits on the amount of information to send.

Back

how do you add more functionality to functions?

Front

by adding parameters

Back

What is the advantage of validating a form on the server by posting to itself?

Front

the user will then get the error messages on the same page as the form. This makes it easier to discover the error.

Back

What is the the $_post Variable?

Front

The $_POST variable is an array of variable names and values sent by the HTTP POST method. The $_POST variable is used to collect values from a form with method= post .

Back

What methods can the $_request variable be used with?

Front

GET and POST

Back

What is the PHP date() function used for?

Front

The PHP date() function is used to format a time or a date.

Back

What is the purpose of the Expat parser?

Front

makes it possible to process XML documents in PHP

Back

What is the the $_GET Variable

Front

The $_GET variable is an array of variable names and values sent by the HTTP GET method. The $_GET variable is used to collect values from a form with method= get

Back

Why is the include() and require() function useful?

Front

Because it can save a considerable amount of time by allowing you to change only a couple of files when headers,footers or menus have to be changed for a website instead of having to maually change all the pages.

Back

what are parameters?

Front

A parameter is just like a variable.

Back

How are the include() or require() function different?

Front

The two functions are identical in every way, except how they handle errors

Back

what are the $_get and $_post variables used for?

Front

The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input.

Back

What is another disadvantage of using the $_get variable?

Front

since the information is transmitted and visible in the address bar is is not secure for personal data

Back