?
Solved

easy if statement question

Posted on 2003-02-22
3
Medium Priority
?
142 Views
Last Modified: 2013-12-25
how, instead of saying if something eq something else, can you say IF SOMETHING INCLUDES SOMETHING ELSE?

for example i have $searchwords="hello world"

how can i make a statement that instead of looking to see if it equals thatm just looking to see if it includes that.

thanks.
0
Comment
Question by:derek4716
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:derek4716
ID: 7999597
I figured it out:

I used  if(somenthing =~ m/$search/i)



I am in the giving mood today :)  First person to post gets the points! Just my way of saying thanks for looking! :)
0
 

Accepted Solution

by:
qwerty1234 earned 400 total points
ID: 8001052
I'll be happy to receive your free points.
0
 

Author Comment

by:derek4716
ID: 8001074
Your welcome, i'm surprised that it took so many hours for someone to respond :)
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question