📲 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 for PHP Strings

🟢 Level 1: Basic (Easy)

1️⃣ Create a string "Hello PHP" and print it.

2️⃣ Find the length of a string "Programming".

3️⃣ Convert "hello world" into:

  • Uppercase
  • Capitalized words

4️⃣ Reverse the string "OpenAI".

5️⃣ Check if the word "PHP" exists in "I love PHP programming".


🟡 Level 2: Intermediate

6️⃣ Concatenate two strings:

$first = "Web";
$second = "Development";

7️⃣ Extract "World" from "Hello World" using substr().

8️⃣ Remove extra spaces from:

"   PHP is awesome   "

9️⃣ Replace "Java" with "PHP" in:

"I love Java"

🔟 Count how many times "a" appears in "banana".


🟠 Level 3: Arrays + Strings

1️⃣1️⃣ Convert this string into an array:

"red,green,blue"

1️⃣2️⃣ Convert this array into a string:

["HTML", "CSS", "JS"]

1️⃣3️⃣ Split a sentence into words:

"PHP is easy to learn"

1️⃣4️⃣ Join words with -:

["2026", "03", "30"]

🔵 Level 4: Logic Based

1️⃣5️⃣ Check if a string is Palindrome
Example: "madam"

1️⃣6️⃣ Count total words in a string.

1️⃣7️⃣ Remove all vowels from a string.

1️⃣8️⃣ Find the longest word in a sentence.

1️⃣9️⃣ Convert a string into Title Case without using ucwords().


🔴 Level 5: Regex (Important)

2️⃣0️⃣ Check if a string contains only numbers.

2️⃣1️⃣ Validate an email address.

2️⃣2️⃣ Remove all digits from a string:

"abc123xyz456"

2️⃣3️⃣ Extract all numbers from a string.

2️⃣4️⃣ Check if a password contains:

  • At least 1 number
  • At least 1 uppercase letter

🟣 Level 6: Real-World Problems

2️⃣5️⃣ Create a username generator:

"Aditya Kumar Singh" → aditya_kumar

2️⃣6️⃣ Create a slug generator:

"Learn PHP in 2026!" → learn-php-in-2026

2️⃣7️⃣ Mask an email:

test@gmail.com → t***@gmail.com

2️⃣8️⃣ Count characters, words, vowels in a paragraph.

2️⃣9️⃣ Format currency:

1000000 → 10,00,000

🧠 Bonus Challenge (Advanced)

3️⃣0️⃣ Build a mini search system:

  • Input: keyword
  • Check if it exists in a paragraph
  • Highlight matched word

🚀 Tip for Students

Practice in this order:
👉 Basic → Manipulation → explode/implode → Regex → Real projects



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