title: Convert Unix TimeStamp into "x seconds ago"
body: <p>so I have a table which lists chat messages in my game server (chat messages are stored in a database) and I have a UNIX timestap like this (for example) 1455749769</p>
  
  <p>Does anyone know how I can use php to convert the timestamp so it echos how long ago the chat message was for example: "5 Seconds Ago" </p>
  
  <p>Here is my table</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>$name=$row['client_name'];
  $time=$row['msg_time'];
  $name=htmlentities($name);
          echo "&lt;tr&gt;";
   echo "&lt;td&gt; $time &lt;/td&gt;";
   echo "&lt;td&gt;&lt;a href='http://144.76.158.173/ech/user.php?id=".$row["client_id"]."' &gt; $name &lt;/a&gt;&lt;/td&gt;";
   echo "&lt;td&gt; $msg &lt;/td&gt;";
   echo "&lt;/tr&gt;";
      }
      echo "&lt;/table&gt;";
  } else {
      echo "0 results";
  echo "&lt;/div&gt;";
  }
  $conn-&gt;close();
  ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any help greatly appreciated :)</p>