title: using require statments with if/elseif statements
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4697787/php-question-how-to-fix-these-if-elseif-statements">PHP Question: How to fix these if/elseif statements</a>  </p>
  </blockquote>
  
  
  
  <p>Hello is there a way to write if/ elseif statements to display multiple php pages using require statements. I am currently collecting articles from blogs using rss and displaying the links on a web page. How can I display a certain feed depending on an array value selected from a mysql database. Sorry this is a lot, hope I explained my question well. Here is the code on the display page:</p>
  
  <pre><code>$query = "SELECT interests FROM signup WHERE username = '$username'";
  $result = mysql_query($query) or die ("no query");
  
  $result_array = array();
  while($row = mysql_fetch_array($result))
  {
  $result_array[] = $row['interests'];
  } if ($result_array[0] = Politics) {
  require 'politics.php';
  } 
  </code></pre>