1.

If $a represents an array with numeric indices in PHP, the first element accessed by ______________(a) $a[1](b) $a[0](c) $a.1(d) $a.0This question was addressed to me in a job interview.My query is from Numeric Data Types in portion Data Type Reference, Operators and Functions of MySQL

Answer»

The correct OPTION is (b) $a[0]

The best I can explain: If $a represents an ARRAY with numeric indices, its elements are accessed as $x[0], $x[1], and so on. In GENERAL terms, each element at the position i is accessed and USED as $a[i – 1].



Discussion

No Comment Found

Related InterviewSolutions