Home

What will be the output of the following PHP code?
 <?php  $cars = array(Volvo, BMW, Toyota, Honda, Mercedes, Opel);
print_r(array_chunk($cars, 2));
?>

A.

Array ( [0] => Array ( [1] => Volvo [2] => BMW ) [1] => Array ( [1] => Toyota [2] => Honda ) [2] => Array ( [1] => Mercedes [2] => Opel ) )

B.

Array ( [1] => Array ( [1] => Volvo [2] => BMW ) [2] => Array ( [1] => Toyota [2] => Honda ) [3] => Array ( [1] => Mercedes [2] => Opel ) )

C.

Array ( [0] => Array ( [0] => Volvo [1] => Volvo ) [1] => Array ( [0] => BMW [1] => BMW ) [2] => Array ( [0] => Toyota [1] => Toyota ) )

D.

Array ( [0] => Array ( [0] => Volvo [1] => BMW ) [1] => Array ( [0] => Toyota [1] => Honda ) [2] => Array ( [0] => Mercedes [1] => Opel ) )

0) print $i;} ?> ">What will be the output of the following PHP code ? <?php $i = 2;while (++$i){ while ($i --> 0) print…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1.$color2;?>…
  • What will be the output of the following PHP code ? <?php $i = 0;while(++$i || --$i){ print $i;}…
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = green;echo $color1…
  • Which one of the following is the very first task executed by a session enabled page?
  • If session.use_cookie is set to 0, this results in use of..
  • What will be the output of the following PHP code? <?php $fname = array(Peter, Ben, Joe);$age = array(35,…
  • What will be the output of the following PHP code ? <?php define('GOOD_OCTAL', 0700);define('BAD_OCTAL',…
  • A PHP script should start with ___ and end with ___:
  • What will be the output of the following PHP code? <?php $a1 = array(red, green);$a2 = array(blue,…
  • Which of the following PHP statements will output Hello World on the screen?i) echo (“Hello World”);ii)…
  • What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, blue);$b1 = array_fill(0,…
  • What will be the output of the following PHP code? <?php $a1 = array(a=>red, b=>green, c=>blue, d=>yellow);$a2…
  • Which of following variables can be assigned a value to it?i) $3helloii) $_helloiii) $thisiv) $This
  • What will be the output of the following PHP code ? <?php $color1 = red;$color2 = red;echo $color1…
  • How many ways can a session data be stored?
  • What will be the output of the following PHP code ? <?php $i = 0;while ($i = 10){ print hi;}print…
  • What will be the output of the following PHP code? <?php $cars = array(Volvo, BMW, Toyota, Honda,…
  • Which one of the following is the default PHP session name?
  • What will be the output of the following code?<?php $foo = 'Bob'; $bar = &$foo; $bar…
  • What will be the output of the following PHP code? <?php $a = array(a=>red, b=>green, c=>blue);echo…
  • What is the default number of seconds that cached session pages are made available before the new pages…
  • -->

    Please do not use chat terms. Example: avoid using "grt" instead of "great".