1. Question: What is the output?
    <?php
    $array = array("pic10.jpg","pic20.jpg","pic30.jpg","pic40.jpg","pic5.jpg");
    Natsort ($array);
    print_r($array);
    ?>

    A
    Array ( [0] => pic5.jpg [1] => pic10.jpg [2] => pic20.jpg [3] => pic30.jpg [4] => pic40.jpg )

    B
    Array ( [4] => pic5.jpg [0] => pic10.jpg [1] => pic20.jpg [2] => pic30.jpg [3] => pic40.jpg )

    C
    Array ( [4] => pic40.jpg [3] => pic30.jpg [2] => pic20.jpg [1] => pic10.jpg [0] => pic5.jpg )

    D
    None

    Note: Not available
    1. Report
  2. Question: What is the output?
    <?php
    $array = array (10, 20, 10, 30, 20, 40, 20, 40);
    asort ($array, SORT_STRING);
    print_r($array);
    ?>

    A
    Array ( [0] => 10 [2] => 10 [4] => 20 [1] => 20 [6] => 20 [3] => 30 [7] => 40 [5] => 40 )

    B
    Array ( [0] => 10 [1] => 10 [2] => 20 [3] => 20 [4] => 20 [5] => 30 [6] => 40 [7] => 40 )

    C
    Array ( [10] => 0 [10] => 1 [20] => 2 [20] => 3 [20] => 4 [30] => 5 [40] => 6 [40] => 7 )

    D
    Array ( [0] => 10 [1] => 20[2] => 10[3] => 30[4] => 20 [5] => 40[6] => 20[7] => 40 )

    Note: Not available
    1. Report
  3. Question: What is the output?
    <?php
    $array = array(10,20,10,30,20,40,20,40);
    $a =array_count_values($array);
    print_r($a);
    ?>

    A
    Array ( [2] => 10 [3] => 20 [1] => 30 [2] => 40 )

    B
    Array ( [0] => 10 [1] => 20 [2] => 10 [3] => 30[4] => 20[5] => 40[6] => 20[7] => 40)

    C
    Array ( [10] => 2 [20] => 3 [30] => 1 [40] => 2 )

    D
    None

    Note: Not available
    1. Report
  4. Question: How to remove last element of an array?

    A
    array_shift()

    B
    array_unshift()

    C
    array_push()

    D
    array_pop()

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