I tried all the suggestions that were given to me and all of them worked!. I have one more question, i am using
$wgHooks['ParserAfterStrip'][] = 'myShowReferenceFunction';
This function basically gets a list of references for an article from the database. I want to know how can i append the list thus obtained at the end of the article?. Is there any specific way to do it?
Thanks