title: Help with conditional operation
body: <p>I have some basic knowledge in PHP, and I actually understand what the code below actualy does, but I need to do a thing a little bit mor complex and I hope you can help me.</p>
  
  <p>I am the admin of a sales website, we had some troubles with the programmer and he got fired by my boss, so while we are looking for a new programmer I need to come up with a solution for this.</p>
  
  <p>This code does the following: if $buyers is 0, then it displays the message "Be the first to buy it!"; if it's equal 1, then it displays "1 buyer"; if it's equal 2 (and so), then it displays "2 buyers";</p>
  
  <pre><code>&lt;p class="Lato"&gt;&lt;?php echo $buyers==0 ? "Be the first to buy it!" : $buyers ; ?&gt;&lt;?php echo intval($buyers)&gt;0 ? intval($buyers)&gt;1 ? " buyers" : " buyer" :"" ?&gt;&lt;/p&gt;
  </code></pre>
  
  <p>But this is only for the purchases already approved by the credit card companies, so if 30 people bought it but only 2 were actually approved, it will display "2 buyers".</p>
  
  <p>So, I need it to display "2 buyers + 28 pending" so people can see that the product is actually selling.</p>
  
  <p>On the database that controls payment, we have the tables for "buyer" and for "pending" so it's easy to implement that. I just can't figure out how, PHP it's not my area, I just figure out some things here and there because I'm actually a programmer, but for another language.</p>
  
  <p>That's it thank you guys for your time.</p>