the difference between the two is same as
echo and return in PHP.
hope this makes sense
I have to disagree. If you use echo instead of return in the shortcode api, the content returned by the shortcode will be placed at the begining on the page/post, regardless of where you place it in your text.
agree with you. thats why i needed this function
in shortcode if i use dynamic_sidebar('sidebar') it echos at the top of page.can't return contents.
but if when i used the function given above i can return the contents in shortcode