title: Php option value
body: <p>I have a list of areas (1000+) and i was wondering if there was a way i can do this easier with code instead of repeating each value. </p>
  
  <pre><code>&lt;select&gt;
  &lt;option value="apple" &lt;?php if ($user_data["$area"] == apple){echo 'selected';} ?&gt;&gt;Apple
  &lt;/option&gt; 
  
  &lt;option value="lemon" &lt;?php if ($user_data["$area"] == lemon){echo 'selected';} ?&gt;&gt;Lemon
  &lt;/option&gt; 
  
  &lt;option value="orange" &lt;?php if ($user_data["$area"] == orange){echo 'selected';} ?&gt;&gt;Orange
  &lt;/option&gt; 
  
  &lt;option value="banana" &lt;?php if ($user_data["$area"] == banana){echo 'selected';} ?&gt;&gt;Banana
  &lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I.E. have the same piece of php code for each option instead of having to type in the name of the value each time </p>
  
  <pre><code>&lt;?php if ($user_data["$area"] == option VALUE){echo 'selected';} ?&gt;
  </code></pre>
  
  <p>Could you provide some code or ideas for what to look in tutorials, i have no idea how to start. Thank you!</p>