Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

App dev Mod 3&4

QuestionAnswer
var_dump function is same as print_r function except it adds additional information about the data of each element. True
$fruit = array(“orange”,”apple”,”grape”,”banana”); What is the value of index 2? grape
foreach($arr as ______) $value
Function can have a return value True
Array is used to aggregate a series of similar items together. True
$g = 200; function a(){echo “5”;} function b(){echo “4”;} a();b(); what is the output of the code? Error
function is used to print the array structure. print_r
Sorts by a function usort($array)
Array can be used as ordinary array same as in C and C++ arrays. True
is a group of PHP statements that performs a specific task. Functions are designed to allow you to reuse the same code in different locations. Functions
is used to retain the values calls to the same function. Static variables
You use can functions in different ways. True
$s = “variable”; function f(){ global $s; echo “function called ”; echo “$s”; } f(); what is the output of the code? function called variable
PHP has a built-in function to perform operations True
Local Variables is one that declared outside a function and is available to all parts of the program. False
$t = 100; function one(){ echo “1000”; } one(); what is the value of the $t after execute the code? 100
function disp(){ function disp2(){ echo “hello”; } } Disp(); disp2(); hello
Array index is also known as Array Keys. True
Sorts by value in reverse order; assign new number as the keys arsort($array)
rsort(), arsort(), and krsort() functions are used to sort elements in the array in descending order. True
Each member of the array index references a corresponding value and can be a simple numerical reference to the value’s position in the series, or it could have some direct correlation to the value. True
$f = array( '102' => "red", '101' => "blue", '100' => "yellow"); krsort($f); print_r($f); What is the output of the code? Array ( [102] => red [101] => blue [100] => yellow )
Sorts by value; assign new numbers as the keys sort($array)
To gain access to a variable that is outside from the function we use the global keyword. True
You can create your own function inside of a php code True
is one that declared outside a function and is available to all parts of the program. Global variables
function disp(){ function disp2(){ echo “hello”; } } disp(); disp2(); hello
functions that are provided by the user of the program. User defined function
$a[]=”mango”; $a[]=”apple”; $a[]=”banana”; Check the code if valid or invalid? Invalid
Functions can only have 1 parameter False
Functions is a group of PHP statements that performs a specific task. True
prints additional information about the size and type of the values it discovers var_dump()
$mo = array(“jan”,”feb”,”mar”); echo “<pre>”; var_dump ($mo); echo “</pre>”; Check the code if valid or invalid? Invalid
$mo = array(“jan”,”feb”,”mar”); echo “<pre>”; print_r ($mo); echo “</pre>”; Check the code if valid or invalid? Invalid
Functions can be user defined generally defined by the user of the program and predefined that are build in using libraries. True
$g = 200; function a(){echo “5”;} function b(){echo “4”;} a(); what is the output of the code? 5
asort() and arsort() used to sort elements by keys. False
What is the keyword use to gain access a variable that is outside of the function? Global
What do you call a function inside of a function Nested function
function keyword is used in PHP to declare a function. True
references a corresponding value. Array index
function a($a,$b){ return $a+$b; } echo a(6,5); what is the value of $a? 6
Using foreach statement you can display both the keys and value of each element in the array. True
Functions are limited to 1 per code only False
$fruit = array(“orange”,”apple”,”grape”,”banana”); What is the value of index 1? apple
specify an array expression within a set of parenthesis following the foreach keyword. False
$g = 200; function a(){echo “5”;} function b(){echo “4”;} ab(); what is the output of the code? error
Global Variables is declared inside a function and is only available within the function in which it is declared. False
$num=array(1,2,3,4,5); foreach($num as $val){ echo $val; } What is the output of the code? 12345
Created by: jxxnixx
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards