, ,

What is Array in PHP? Write down top 10 real use cases of Array in programming?

Posted by

Array in PHP

Arrays are collection of data items stored under a single name. It provide a mechanism for declaring and accessing several data items with only one identifier, thereby simplifying the task of data management.
We use array when we have to deal with numerous multiple data items.

PHP Array

Some real use cases of Array in programming:

  • A simple question Paper is an array of numbered questions with each of them assigned some marks.
  • It is also used in speech processing, in which each speech signal is an array.
  • Arrangement of the leader-board of a game can be done simply through arrays to store the score and arrange them in descending order to clearly make out the rank of each player in the game.
  • Your viewing screen is also a multidimensional array of pixels.
  • Online ticket booking.
  • For CPU scheduling in computer.
  • To store the possible moves of chess on a chessboard.
  • To store images of a specific size on an android or laptop.
  • Book titles in a Library Management Systems.
  • 2D arrays, commonly known as, matrices, are used in image processing.
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x