Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

PHP QUESTIONS : PART 15

What will be the output for:

$ar=array(212,413,56,17);

echo reset($ar);

212 

 17

SHOW ANSWER

What will be the output for :

$sat=array(22,43,56,77,65);

sizeOf($sat);

5



 65



 4

SHOW ANSWER

What will be the output for:

$ext=array(22,43,56,77,65);

if(is_array($ext))

     { echo “array exist”;}

        else

             {echo “dont exist”;}

array exists 

 array dont exist 

true 

SHOW ANSWER

What will be the output for:

$ext=array(22,43,56,77,65);

if(is_array($exit))

     { echo “array exist”;}

else {echo “dont exist”;}

array dont exists

 array exists 

 false

SHOW ANSWER

What will be the output for :

 $arrest=array( ‘cat’,’dog’,’mouse’);

        arsort($arrest);

    foreach($arrest as $x)

          {echo $x;}

‘mouse’’dog’’cat’ 

 catmousedog 

‘mousedogcat

SHOW ANSWER

Give the output for : $rest=array(34,65,45,98,76);

        arsort($rest);

foreach($rest as $s)

        {echo $s;}

9876654534 

 3445657698 


SHOW ANSWER

Give the output for : rest=array(34,65,45,98,76);

asort($rest);

foreach($rest as $s)

{echo $s; }

3445657698 

 9876654534 

 3465459876

SHOW ANSWER

What will be the output for :

$arrest=array( “cat”,”dog”,”mouse”,”elephant”);

asort($arrest);

foreach($arrest as $x)

{echo $x ;}

catdogelephantmouse 

 catdogmouseelephant 

mouseelephantdogcat 

SHOW ANSWER

What will be the output for:

    $var=array(‘Benz’,’Volksvagon’,’Ferrari’);   

                      echo end($var);

Ferrari 

 Benz 

 Volksvagon

SHOW ANSWER

next( ) returns value ____________

after the cursor position 

at the cursor position 

 before cursor position

SHOW ANSWER

Construct used to retrieve values in an array

list( ) 

 array( ) 

 key( )

SHOW ANSWER

Give the output for :

   $rest=array(34,65,45,98,76);

                    echo count($rest);

 6 

7

SHOW ANSWER

The prev( ) function moves the pointer

back by one 

 to the last entry in the list 

 to the last entry in the list

SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in