title: How to find if a variable contains certain character or not ? PHP
body: <p><strong>Intro</strong></p>
  
  <p>In search, i want to make search for age range.</p>
  
  <p>if a user inserts a '-' included input like <em>10-30</em> this way
   i will display list of people age greater than 10 and less than 30.</p>
  
  <p><strong>My Question</strong></p>
  
  <pre><code>$q = mysql_real_escape_string(htmlspecialchars("user input from search field"));
  </code></pre>
  
  <p>From here before entering to make query i want to make two conditions, 
  One: if there's a '-' in user input or not ? if yes i want to query as according, if not the other way.</p>
  
  <p>So, how can i enter into the first condition ?</p>