Umair Y.

asked • 08/07/15

PHP Array Help

The associative Array in PHP language can be define/declare through Array() function and can take any number of key-value pairs. The indices/keys of an associative array can be numeric or string.

Write a small program (Code) in PHP language which declares an array of five students named “Student”. The key/index of this array would be students’ roll numbers while the values would be their names. Also print students’ names on the screen.
Sample output:
Student 1: Ahmed Ali
Student 2: Ikram
Student 3: Sumair
Student 4: Imran
Student 5: Shabeer

1 Expert Answer

By:

Murshed A. answered • 11/14/15

Tutor
5 (11)

Experienced Engineering tutor who gets results!

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.