1. Question: What is the result or output of the array?

    $garden = array("cabbage", "peppers", "turnips", "carrots");
    echo count($garden);

    A
    4

    B
    5

    C
    6

    D
    3

    Note: Not available
    1. Report
  2. Question: $locations = array("Italy", "Amsterdam", array("Boston","Des Moines"), "Miami"); echo count($locations, 1); This returns the following:

    A
    6

    B
    4

    C
    5

    D
    7

    Note: Not available
    1. Report
  3. Question: $states = array("Ohio", "Iowa", "Arizona", "Iowa", "Ohio"); $stateFrequency = array_count_values($states); print_r($stateFrequency); This returns the following:

    A
    Array ( [Ohio] => 2 [Iowa] => 2 [Arizona] => 2 )

    B
    Array ( [Ohio] => 2 [Iowa] => 2 [Arizona] => 1 )

    C
    Array ( [Ohio] => 2 [Iowa] => 1 [Arizona] => 1 )

    D
    Array ( [Ohio] => 2 [Iowa] => 1 [Arizona] => 2 )

    Note: Not available
    1. Report
  4. Question: The array_unique() function ______ all duplicate values found in an array.

    A
    removes

    B
    added

    C
    plus

    D
    minus

    Note: Not available
    1. Report
  5. Question: $states = array("Ohio", "Iowa", "Arizona", "Iowa", "Ohio"); $uniqueStates = array_unique($states); print_r($uniqueStates); This returns the following:

    A
    Array ( [2] => Ohio [2] => Iowa [1] => Arizona )

    B
    Array ( [2] => Ohio [1] => Iowa [2] => Arizona )

    C
    Array ( [0] => Ohio [1] => Iowa [2] => Arizona )

    D
    Array ( [0] => Ohio [2] => Iowa [2] => Arizona )

    Note: Not available
    1. Report
  6. Question: $state = array("Delaware", "Pennsylvania", "New Jersey"); $state = array_flip($state); print_r($state); This example returns the following:

    A
    Array ( [Delaware] => 0 [Pennsylvania] => 1 [New Jersey] => 2 )

    B
    Array (0 =>[Delaware] 1=>[Pennsylvania] 2 =>[New Jersey] )

    C
    Array ( [Delaware] => 1 [Pennsylvania] => 2[New Jersey] => 3 )

    D
    Array ( [Delaware] => 0 [Pennsylvania] => 1 [New Jersey] => 2 )

    Note: Not available
    1. Report
  7. Question:  — Creates an array by using one array for keys and another for its values

    A
    Array_Splice

    B
    array_combine

    C
    Array_Fill()

    Note: Not available
    1. Report
  8. Question: Which statement are true about Array?

    A
    An array is traditionally defined as a group of items that share certain characteristics

    B
    As array values can be other arrays, trees and multidimensional arrays are also possible.

    C
    Offer  considerable practical value to the programmer and are used to divide an otherwise complex.

    Note: Not available
    1. Report
  9. Question: Which function use to remove a portion of the array and replace it with something else

    A
    Array_Splice

    B
    array_combine

    C
    Array_Fill()

    Note: Not available
    1. Report
  10. Question: How to remove duplicate from an array?

    A
    Array_Duplicate

    B
    Array_Unique

    C
    Array_Push()

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd