title: If, else statement with Twilio. I want to use a different response based on my query result
body: <p>My query will either exist or not exist. If it does it exist, my row counter is 1 but if it does not exist the row counter is 0. I am trying to use a response based on the row counter's value. See below. If there is a better way to do this, I am all ears.</p>
  
  <pre><code>if ($rowcounter==1){
  
  echo "&lt;?xml version="1.0" encoding="UTF-8"?&gt;";
  echo "&lt;Response&gt;&lt;Say&gt;Welcome" . $companyname . "&lt;/Say&gt;&lt;/Response&gt;";
  
  }
  
  else
  
  {
  
  echo "&lt;?xml version="1.0" encoding="UTF-8"?&gt;";
  echo "&lt;Response&gt;&lt;Say&gt;We could not locate your customer number&lt;/Say&gt;&lt;/Response&gt;";
  
  }
  </code></pre>
  
  <p>Removing the code within the else brackets allows the code to work fine but I'm not sure how to get my else statement working.</p>