title: joining two function php
body: <p>By some sorts of functions I am returning values of two functins... LIke</p>
  
  <pre><code>&lt;? if(check_status_ticket($result["ticket_id"])) echo 'style="font-weight:bold;"'; ?&gt;
  </code></pre>
  
  <p>Second condition is </p>
  
  <pre><code> &lt;? if($result["priority"]=='Emergency' &amp;&amp; $result["status"]=='Open')  echo 'style="color:red;"';?&gt;
  </code></pre>
  
  <p>I want to combine these two conditions using function. That if first condition is true it returns only bold. If second condition is also true it gives red and bold but if both are false it return default</p>
  
  <pre><code>function check_status_ticket( $ticket_id ){
        $query = mysql_query( "SELECT ticket_id FROM tkt_newticket WHERE ticket_id='".$ticket_id."' AND response='No' AND status='Open'" ) or die( mysql_error() );
        if(mysql_num_rows($query)=='0'){
            return FALSE;
            }
       else{
        return TRUE; }
  }
  </code></pre>