Let me preface this by saying I'm a beginner, so go easy. I'm currently using the datatables plugin to output some rows from Mysql. This includes a Timestamp, and I would like to convert it into an "ago" format. I've researched and found that there are multiple js scripts that do this : moments.js, timeago.js, livestamp.js. I have tried with no success here is my code :
<table id="player_data" class="table table-bordered">
        <thead>
            <tr>
                <td>1</td>
                <td>2</td>
                <td>3</td>
                <td>4</td>
                <td>5</td>
                <td>Time</td>
            </tr>
        </thead>
         <?php
          while($row = mysqli_fetch_array($result))  
          {  
               echo '  
               <tr>  
                    <td>'.$row[ "1"]. '</td>  
                    <td>'.$row[ "2"]. '</td>  
                    <td>'.$row[ "3"]. '</td>  
                    <td>'.$row[ "4"]. '</td>  
                    <td>'.$row[ "5"]. '</td>  
                    <td>'.$row[ "time"]. '</td>
               </tr>  
               ';  
          }  
          ?>
</table>
How can I echo "time" in a x seconds ago format?
 
    