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 12

The arrays used in php are

Associative arrays 

 vector arrays 

 Scalar arrays

SHOW ANSWER

Associative arrays store __________

heterogeneous data 

 homogeneous data 

both homogenous and heterogeneous data

SHOW ANSWER

The arrays used in C,C++,Pascal etc are

Vector arrays 

 Associative arrays

 Scalar arrays 

SHOW ANSWER

For an indexed array the index values must be

Integer datatype 

 Float datatype 

 String datatype

SHOW ANSWER

For a php array the index value or the keys can be of _________

Any datatype 

 Integer type 

 String type

SHOW ANSWER

An example for creating an array by array construct method

$arr=array(‘Apple’, ‘Orange’,’Mango ‘); 

  $arr[ ]=Array(‘Apple’,’Orange’,’Mango’); 

$arr[ ]={‘Apple’,’Orange’,’Mango’};

SHOW ANSWER

The default starting index number of an array in php is

 1

no starting number

SHOW ANSWER

The syntax for assigning values to keys in a php array is

 $arrayname=array(keyname=> value); 

$arrayname=Array(keyname->value); 

 $arrayname={keyname=>value};

SHOW ANSWER

Syntax for creating array with no arguments

$arrayname=array( );

 $arrayname=Array( ); 

$arrayname={ };

SHOW ANSWER

Example for creating array with no arguments

 $arg=array( ); 

 $arg=Array( ); 

 $arg={ };

SHOW ANSWER

Array that store each element with a numeric index

numeric array

associative array 

vector array

SHOW ANSWER

The syntax for numerical array declaration

$arrayname[index number]=value 

$arrayname(index number)=value

$arrayname{index number}=value

SHOW ANSWER

An example for numerical array declaration

$arr[ 0]= ’ Hello ‘; 

 $arr( 1)=’ Hello ‘;

 $arr{1}=’Hello ’;

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