[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

Case Insensitive

How do I make something case insensitive?
Say, if

$variable1 = "Hello";
$variable2 = "HELLO";

How can I tell if variable1 and variable 2 are the same, even though one is totally capitalized, and the other isn't?

Thanks,
Mark
0
eversoslightly
Asked:
eversoslightly
  • 2
1 Solution
 
martinagCommented:
if (lc($variable1) eq lc($variable2)) {
  # I don't know is the "correct" way of doing it, but it works...
}

Martin
0
 
eversoslightlyAuthor Commented:
Thanks!  Works great - just answer the question, and I'll give ya the points.
0
 
martinagCommented:
if (lc($variable1) eq lc($variable2)) {
  # I don't know is the "correct" way of doing it, but it works...
}

Martin
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now