Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7940073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:16:47+00:00 2026-06-03T23:16:47+00:00

In php, stripos() performs case sensitive searching of a character and returns its position.

  • 0

In php, stripos() performs case sensitive searching of a character and returns its position. But in the following code, position of the character L is returned irrespective of its case sensitivity.

<?php

$a = array('hello','world');
foreach($a as $val) {

echo $val;

echo stripos($val, 'L'); //returns hello2world3
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T23:16:49+00:00Added an answer on June 3, 2026 at 11:16 pm

    From php documentation

    • stripos is for case-insensitive search.

    • If you want case sensitive search then you should use strpos.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following PHP, when passed this image , writes 0 bytes to $cache (but
PHP version 5.3 has been released, and although it looks great, all my code
PHP uses magic quotes by default but has gotten a lot of flak for
PHP code: <a id=a$id onclick=check($id,1) href=javascript:void(0) class=black>Qualify</a> I want to remove the onclick=check($id,1) so
I am using php to pull information out of a database, but I have
i have this code: <?php var_dump(strpos($url, cashgold.)+9) ?> <?php var_dump(strpos($url, '/', 8)) ?> <?php
I'm having some trouble with the following code, more than likely a n00b error
I have php variable which when echoed, blurts out the html. But I was
For doing insensitive case search in strings which function is faster preg_match() or stripos()?
Hi In JavaScript, how can I do the same function like the code(PHP) below?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.