1. Question: Which function reverses the roles of the keys and their corresponding values in an array?

    A
    array_sort()

    B
    array_flip()

    C
    array_shift()

    D
    array_list()

    Note: Not available
    1. Report
  2. Question: Which function is functionally identical to natsort(), except that it is case insensitive?

    A
    natcasesort()

    B
    natsort()

    C
    ksort()

    D
    krsort()

    Note: Not available
    1. Report
  3. Question: Which function returns a section of an array based on a starting and ending offset value?

    A
    array_slice()

    B
    array_marge()

    C
    array_sort()

    D
    array_combine()

    Note: Not available
    1. Report
  4. Question: Which function will return a random number of keys found in an array?

    A
    array_rand()

    B
    array_ksort()

    C
    array_rom()

    D
    array_sort()

    Note: Not available
    1. Report
  5. Question: Which functions adding a value to the end of an array in php?

    A
    Unshift

    B
    Shift

    C
    array_unshift

    D
    array_push

    Note: Not available
    1. Report
  6. Question: What will be the following script output? <?php $names=array(“Robi”,”Soni”,”Roni”); $name=array_pop($names); print_r($names); ?>

    A
    Array ( [0] => “Robi” [1] => ”Soni” =>”,”Roni”);

    B
    Array ( [0] ] => “Robi” [1] => ”Soni” ] => ”Roni”)

    C
    Array ([0] => ”Soni”[1] =>”Roni”)

    D
    Array ( [0] => “Robi” [1] => ”Soni” )

    Note: Not available
    1. Report
  7. Question: What will be the following script's output? <?php $countryes=array(“India”,”Japan”,”Uk”); $country=array_shift($countryes); print_r($countryes); ?>

    A
    Array ( [0] => ”India” [1] => ” Japan” )

    B
    Array ( [0] => ”India” [1] => ” Japan” [2]=>”Uk”)

    C
    Array ( [1] => ”Japan” [2] => ”Uk” )

    D
    Array ( [0] => ”Japan” [1] => ”Uk” )

    Note: Not available
    1. Report
  8. Question: Which of the following way will you use for creating array in php?

    A
    $colorList =array("blue","black","white");

    B
    $colorList[] = "red"; $colorList[] = "green"; $colorList[] = "black";

    C
    $colorList[0] = "red"; $colorList[1] = "green"; $colorList[2] = "blue";

    D
    $colorList = "red"; $colorList = "green"; $colorList = "blue";

    Note: Not available
    1. Report
  9. Question: If you want to display all elements what will you use of the following script? <?php $colorList[0] = "red"; $colorList[1] = "green"; $colorList[2] = "blue"; $colorList[3] = "black"; ?>

    A
    foreach ($colorList as $value) { echo $value; }

    B
    echo $colorList[0];

    Note: Not available
    1. Report
  10. Question: What will be the followings  script output? <?php $colorList[0] = "red"; $colorList[1] = "green"; $colorList[2] = "blue"; $colorList[3] = "black";      echo sizeof($colorList); ?>

    A
    4 strings

    B
    4

    C
    4 array

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