title: PHP Switch passing value for multiple use
body: <p>I wan to write a function with switch() where I can pass option value for multiple object.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>&lt;?php
  function font_switch(){
  
      if ($option == get_option('fm_font_family')) {
          get_option('fm_font_family') ;
      } else if ($option == get_option('fm_font_family_text')) {
          get_option('fm_font_family_text') ;
      }
  
      switch($option){
  
          case 'Choose font family':
              return null;
              break;
  
          case 'Georgia, serif':
              return 'Georgia, serif';
              break;
  
          case 'Palatino Linotype, Book Antiqua, Palatino, serif':
              return 'Palatino Linotype, Book Antiqua, Palatino, serif';
              break;
  
          case 'Times New Roman, Times, serif':
              return 'Times New Roman, Times, serif';
              break;
  
          case 'Arial, Helvetica, sans-serif':  
              return 'Arial, Helvetica, sans-serif'; 
              break;
  
          case 'Comic Sans MS, cursive, sans-serif':
              return 'Comic Sans MS, cursive, sans-serif';
              break;
  
          case 'Impact, Charcoal, sans-serif':
              return 'Impact, Charcoal, sans-serif';
              break;
  
          case 'Lucida Sans Unicode, Lucida Grande, sans-serif':
              return 'Lucida Sans Unicode, Lucida Grande, sans-serif';
              break;
  
          case 'Tahoma, Geneva, sans-serif':
              return 'Tahoma, Geneva, sans-serif';
              break;
  
          case 'Verdana, Geneva, sans-serif':
              return 'Verdana, Geneva, sans-serif';
              break;
  
          default:
              return '';
              break;        
      }
  }
  ?&gt;
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code> body{
       font-family: &lt;?php echo font_switch(get_option('fm_font_family')); ?&gt;;
      }
      p{
       font-family: &lt;?php echo font_switch(get_option('fm_font_family_text')); ?&gt;;
      }
  </code></pre>
  
  <p>So in above function I want to pass option using get_option('my option id') and want to use it for css as I am using same font family</p>
  
  <p>If you have any other better option I can go for it too.</p>