title: Last letter change based on number incrase
body: <p>How can i change the last letter of an word like: </p>
  
  <p>You have 10 weeks left, well i want to change weeks to week based on number incrase if is 1 i want to be: 1 week&lt;- and if 2, to be : 2 weeks&lt;- in echo result</p>
  
  <p>I have this process:</p>
  
  <pre><code>function get_weeks_remaining($date, $expire){
  
          $difference = strtotime($expire) - strtotime($date);
          return floor($difference / 604800);
  
  }
  $link = mysqli_connect("localhost", "user", "pass", "table"); 
  $nume = $user-&gt;data-&gt;username;
  $id = $user-&gt;data-&gt;id;
  $date = date('m/d/Y h:i:s a', time());
  $expire_date = 'May 07, 2016';
  $remain =  get_weeks_remaining($date, $expire_date);
  
  $sql = "SELECT `id`,`remain` FROM `week`";
  if($result = mysqli_query($link, $sql)){
  if(mysqli_num_rows($result) &gt; 0){
  while(list($id,$remain) = mysqli_fetch_array($result)){
  echo "you have $remain weeks left";
  }
  mysqli_free_result($result);
      }
  }
  </code></pre>