How to transfer data from Controller to View Magento ?

Hello Developer,

today we are Learn How to transfer data from Controller to View Magento.

Magento have a inbuilt function to pass array from controller to Phtml file. You can Pass any Data Like a Array String using this Method.

First You have to Store a Value in one variable.

$cars =array("Volvo","BMW","Toyota");

Its You array You want to pass a result in phtml file from controller Magento. then You can use Mage::register method to pass array in controller.

Now Set this value in Your Controller.


In this line the cars_data name is only name to access the data in phtml file. You can writer here any name as per Your Choice.

Now Get Data in Your View Phtml File.

$car_value = Mage::registry('cars_data');

Now You Can Store the data in a Variable and you can Check the getting data using var_dump($car_value );



97 thoughts on “How to transfer data from Controller to View Magento ?

  1. Hey webmaster
    When you write some blogs and share with us,that is a hard work for you but share makes you happly right?
    yes I am a blogger too,and I wanna share with you my method to make some extra cash,not too much
    maybe $100 a day,but when you keep up the work,the cash will come in much and more.more info you can checkout my blog.
    good luck and cheers!

  2. Right here is the right site for anyone who wants to find out about this topic.
    You know a whole lot its almost hard to argue with you (not that I actually will need to…HaHa).
    You certainly put a brand new spin on a subject that’s been written about for many years.
    Wonderful stuff, just great!

  3. “Nice post. I used to be checking constantly this blog and I’m impressed! Very helpful information specifically the last section 🙂 I maintain such info much. I was seeking this particular information for a very lengthy time. Thank you and best of luck. “

  4. I would like to express my thanks to you just for rescuing me from this type of condition. Just after exploring through the world wide web and getting tips which are not powerful, I was thinking my life was well over. Being alive minus the answers to the problems you’ve fixed through your entire posting is a crucial case, as well as ones which may have adversely damaged my career if I hadn’t encountered your blog post. Your good natural talent and kindness in touching all things was vital. I don’t know what I would have done if I had not come across such a step like this. I can at this time relish my future. Thanks a lot so much for this impressive and effective guide. I will not be reluctant to suggest the sites to any person who will need care about this problem.

  5. I truly wanted to type a brief message so as to say thanks to you for all the stunning facts you are posting here. My time consuming internet look up has at the end been compensated with reputable tips to talk about with my great friends. I ‘d suppose that most of us readers are undeniably endowed to exist in a perfect site with very many awesome individuals with beneficial basics. I feel rather blessed to have encountered your entire weblog and look forward to so many more awesome moments reading here. Thanks once again for all the details.

  6. I’m typically to running a blog and i actually appreciate your content. The article has really peaks my interest. I’m going to bookmark your website and hold checking for brand spanking new information.

  7. I intended to write you this very small note so as to say thanks once again relating to the striking principles you’ve shared on this site. It is certainly remarkably open-handed with people like you to supply openly what many of us would have distributed as an electronic book to get some money on their own, most notably seeing that you might well have tried it if you decided. The basics likewise acted to be the good way to be sure that other people online have the same fervor like my own to realize many more when considering this matter. I know there are millions of more pleasant times in the future for individuals who looked over your blog.

  8. Thank you a lot for giving everyone a very wonderful chance to read critical reviews from this website. It really is so pleasing plus packed with amusement for me and my office co-workers to visit your site at the least three times in one week to read through the latest secrets you will have. And of course, I am usually fulfilled concerning the gorgeous tips and hints you give. Selected 2 facts in this article are ultimately the most impressive we have all ever had.

  9. I intended to post you a very little remark so as to give thanks the moment again about the stunning solutions you have shown in this article. It’s really unbelievably generous of you to convey publicly what most of us would’ve offered for sale for an e-book in order to make some money for themselves, principally considering that you could possibly have done it if you wanted. Those suggestions likewise served as the good way to fully grasp that other people have the identical keenness just as my very own to know the truth way more regarding this condition. I’m sure there are many more pleasurable occasions ahead for people who take a look at your website.

  10. I simply wanted to write down a brief note to thank you for the nice tips and tricks you are giving at this website. My extended internet research has now been rewarded with good strategies to talk about with my family and friends. I ‘d admit that we readers are undoubtedly fortunate to be in a notable place with so many perfect professionals with good strategies. I feel quite privileged to have come across your entire web pages and look forward to many more fabulous moments reading here. Thank you again for all the details.

  11. An fascinating dialogue is value comment. I feel that you should write extra on this topic, it might not be a taboo topic but typically persons are not enough to speak on such topics. To the next. Cheers

  12. Aw, this was a very nice post. In concept I want to put in writing like this moreover ?taking time and actual effort to make a very good article?but what can I say?I procrastinate alot and under no circumstances appear to get something done.

  13. After research just a few of the blog posts on your web site now, and I really like your approach of blogging. I bookmarked it to my bookmark website checklist and can be checking back soon. Pls take a look at my site as properly and let me know what you think.

  14. I happen to be commenting to let you know of the fabulous encounter my wife’s princess encountered going through your site. She mastered numerous issues, not to mention what it’s like to have an awesome giving style to have many people effortlessly learn selected multifaceted things. You actually did more than my desires. Thanks for producing the necessary, safe, informative and also easy tips about the topic to Gloria.

  15. I really wanted to jot down a brief message so as to appreciate you for all of the amazing techniques you are writing on this website. My rather long internet search has now been compensated with reasonable concept to write about with my partners. I would believe that we website visitors actually are undeniably blessed to be in a fine website with very many brilliant individuals with valuable guidelines. I feel extremely privileged to have encountered your entire webpage and look forward to many more thrilling times reading here. Thank you once again for all the details.

  16. Needed to write you the tiny word so as to thank you so much once again with the splendid opinions you’ve shown above. It has been extremely open-handed with people like you to allow extensively precisely what a few individuals could possibly have distributed as an ebook to help with making some profit for themselves, certainly given that you could have tried it in the event you wanted. Those good ideas also worked to be the great way to fully grasp other people online have similar dreams just like my very own to grasp somewhat more with respect to this issue. I’m certain there are some more enjoyable sessions in the future for folks who find out your blog post.

Leave a Reply

Your email address will not be published. Required fields are marked *