1. Question: What is the output for the following code?
    <?php
       
     $total=0;
       for($i=0;$i<4;$i++){
    
          $total=$total+$i;
       }
    echo $total;
    ?>

    A
    6

    B
    7

    C
    8

    Note: Not available
    1. Report
  2. Question: What is the output for the following code?
    <?php
      $total=0;
      for($i=0;$i<4;$i++){
         
       $total=$total+$i;
    
      }
      echo $total;
    
    ?>

    A
    6

    B
    4

    C
    5

    Note: Not available
    1. Report
  3. Question: What is the output for the following code?
    <?php
      $total=0;
      for($i=0;$i<4;$i++){
         
       $total=$total+$i;
    
      }
      echo $total;
    
    ?>

    A
    6

    B
    7

    C
    8

    Note: Not available
    1. Report
  4. Question: What will be the output?
    <?php
      $i=0;
    while($i<=10){
       if($i<=5){
        continue;
       }
       print($i);
       $i=$i+1;
    }
    ?>

    A
    1

    B
    Infinitive

    C
    5

    D
    10

    Note: Not available
    1. Report
  5. Question: What will be the output?
    <?php
      $i=1;
      do{
        $i++;
        print($i);
      }while($i<=0);
    ?>

    A
    1

    B
    2

    C
    0

    D
    none

    Note: Not available
    1. Report
  6. Question: What will be the output?
    <?php
    foreach($i=1;<$i<=5;$i++){
      print($i);
    }
    ?>

    A
    1

    B
    5

    C
    2

    D
    syntax error

    Note: Not available
    1. Report
  7. Question: Which of the following statement is used for pulling each key/value pair from the array until all items have been retrieved?

    A
    for statement

    B
    foreach statement

    C
    do-while statement

    D
    None

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