📲 Download Utility Tools Apps

EMI Calculator

Download EMI Calculator

SOA Games

Download SOA Games

SOA Technology App

Download SOA Technology

BMI Checker

Download BMI Checker

Task Jira

Download Task Jira

Laughing Adda

Download Laughing Adda

📅 हिंदी कैलेंडर ऐप डाउनलोड करें

Download Shubhcalendar App

practice questions on PHP Arrays

🧠 ✅ Level 1: Basic (Indexed Arrays)

🔹 Q1

Create an indexed array of 5 fruits and print all values.


🔹 Q2

Print the second element of an array:

$colors = ["Red", "Green", "Blue", "Yellow"];

🔹 Q3

Count total elements in an array and print the result.


🔹 Q4

Loop through an array using for loop and display all values.


🔹 Q5

Create an array of numbers and print only numbers greater than 10.


🧠 ✅ Level 2: Associative Arrays

🔹 Q6

Create an associative array of a student:

  • name
  • age
  • course
    Print all values.

🔹 Q7

Loop through associative array using foreach and print:

key = value

🔹 Q8

Find the highest value in this array:

$marks = ["Math" => 80, "Science" => 90, "English" => 75];

🔹 Q9

Check if a key exists in an array.


🔹 Q10

Update a value in associative array (change age).


🧠 ✅ Level 3: Multidimensional Arrays

🔹 Q11

Create a multidimensional array of 3 students:
(name, age, course)


🔹 Q12

Print all student names using loop.


🔹 Q13

Print details in this format:

Aditya - BCA
Rahul - BSc

🔹 Q14

Find the student with highest age.


🧠 ✅ Level 4: Array Functions

🔹 Q15

Sort an array in ascending order.


🔹 Q16

Sort an array in descending order.


🔹 Q17

Merge two arrays and print result.


🔹 Q18

Filter even numbers using array_filter().


🔹 Q19

Square all numbers using array_map().


🔹 Q20

Remove duplicate values from array.


🚀 ✅ Bonus (Important for Projects)

🔹 Q21

Create a simple search system:

  • Array of names
  • User inputs a name
  • Check if it exists

🔹 Q22

Create a marks calculator:

  • Store marks in array
  • Calculate total and average

🔹 Q23

Create a shopping cart system (basic):

  • Add items to array
  • Display all items

🎯 Challenge Questions (Advanced)

🔹 Q24

Sort associative array by values descending.


🔹 Q25

Convert this array:

["a", "b", "c"]

into:

["a" => 1, "b" => 2, "c" => 3]

🔹 Q26

Group numbers into:

  • Even array
  • Odd array

🔹 Q27

Find duplicate values in an array.


🔹 Q28

Flatten a multidimensional array into a single array.


💡 Teaching Tip

Give students:

  • 🟢 Level 1–2 → Beginners
  • 🟡 Level 3–4 → Intermediate
  • 🔴 Bonus + Challenge → Advanced


AI Spiritual Tools & Interactive Experiences

Explore powerful AI-driven tools for daily guidance, spirituality, fun quizzes, and self-discovery.

Today’s Quote

Get inspiring daily quotes powered by AI to motivate and guide your day.

Explore Now

AI Tarot Card Reader

Reveal insights about your future, love, and career with AI tarot readings.

Read Tarot

Love Match Calculator

Check compatibility and love predictions using AI-based analysis.

Check Match

Fortune Cookie

Open an AI fortune cookie and receive wisdom, luck, and fun messages.

Open Cookie

Quiz Categories

Engage with knowledge-based and fun quizzes across multiple categories.

Start Quiz

Panchang Calendar

View daily Panchang, auspicious timings, tithi, nakshatra, and festivals.

View Panchang

Online Numerology

Discover your destiny number, life path, and numerology predictions.

Calculate Now

Spiritual Feeds

Stay connected with spiritual thoughts, mantras, and divine content.

View Feeds

Quiz Hub

Attempt trending quizzes on GK, spirituality, festivals, and more.

Explore Quizzes