reverse a linked list from the middle?

i have done linked list implementation using class in php.
but it is reversing the whole list. please help.

code - http://ideone.com/PkxK9l

@rjohari23
What you exactly want to do.

@arpit728 i figured out the problem. :slight_smile:

//