Question: Well, it seems strange that no one has asked this question before and it has been bothering me for hours but here's what I am trying to do.

I need to reverse the order of a text file, show the last 10 entries and print the contents but not from the last entry showing first. Rather I wish to maintain the order. ie. the first entry should show first and the last entry should show last.

I already have the PHP code to reverse and show the last 10 entries which I posted below with the help of a user. Thanks a ton for your help in advance!

Code 

```
<?php $text = file('user.txt');
$text= array_reverse($text);
$counter=0; 
while ($counter < 10) { 
   if (isset($text[$counter])) { 
       echo $text[$counter] . "";
   } 
   $counter++;
} 
?>

```

Answer: 
You did not include jquery in your fiddle. Also if you use jquery bind your events with it like this: 

```
$(".add-link").on("click", function addFunc(){
    var username = $(this).attr('title');
    $('#content').html(username);
});

```

<http://jsfiddle.net/0f4mun8r/4/>
try to call it with class name :

```
$('.add-link').click(function() {
    var username = $(this).attr('title');
    alert(username);
    $('#content').html(username);
});

```