Friday 19 October 2012

Difference between Foreach and For Loop:-

$array = array("Surinder","Rahul","Manoj","Bharti","Rana","Manish"); Foreach($array as $name )
{
echo "Employe Name is ".$name.".";
}
This will print as following.
Employe Name is Surinder.
Employe Name is Rahul.
Employe Name is Manoj.
Employe Name is Bharti.
Employe Name is Rana.
Employe Name is Manish.

$array = array("Surinder","Rahul","Manoj","Bharti","Rana","Manish");
For($i=0;$i<6;$i++)
{
echo "Employe Name is ".$array[$i].";
}
At the place of 6,You can used count array function.
This will print as following.
Employe Name is Surinder.
Employe Name is Rahul.
Employe Name is Manoj.
Employe Name is Bharti.
Employe Name is Rana.
Employe Name is Manish.
These are the difference between Foreach and for loop.

43 comments:

  1. Thanks give some beneficial and precious information ...i am new for blogging ..this great post i get lot of ideas through your post..
    Slim 24 Pro | Zero Addiction | Fair look | Hot Shapers | Body buildo | Step Up Height Increaser | Sandhi Sudha
    Hanuman chalisa yantra | Air sofa | Body buildo | Air Bra | Hair biulding fibers | Allaah Barkat Locket

    ReplyDelete
  2. step up height increaser It’s an
    amazing ayurvedic product that not just increase your height up to 5 inch but also boost your strength,
    bone mass density. Step up body growth formula is a healthy product that also boost your immune and digestive
    system and provide you with healthy complete body growth.

    ReplyDelete
  3. step up height increaser It’s an
    amazing ayurvedic product that not just increase your height up to 5 inch but also boost your strength,
    bone mass density. Step up body growth formula is a healthy product that also boost your immune and digestive
    system and provide you with healthy complete body growth.

    ReplyDelete
  4. thanks for giving these informortion i faced these question interview Telangana Govt Jobs

    ReplyDelete
  5. Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…
    python training in chennai | python training in bangalore

    python online training | python training in pune

    python training in chennai

    ReplyDelete
  6. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..


    rpa training in anna nagar |

    rpa training in marathahalli

    rpa training in btm

    rpa training in kalyan nagar

    rpa training in electronic city

    rpa training in chennai

    rpa online training

    selenium training in training

    ReplyDelete
  7. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    python online training
    python training in OMR
    python training in tambaram

    ReplyDelete
  8. Thank you for allowing me to read it, welcome to the next in a recent article. And thanks for sharing the nice article, keep posting or updating news article.
    Devops training in sholinganallur
    Devops training in velachery

    ReplyDelete
  9. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    python training in chennai
    python training in Bangalore
    Python training institute in chennai

    ReplyDelete
  10. Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
    DevOps online Training

    ReplyDelete
  11. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.

    Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

    Selenium Training in Bangalore | Best Selenium Training in Bangalore

    AWS Training in Bangalore | Amazon Web Services Training in Bangalore

    ReplyDelete
  12. I would assume that we use more than the eyes to gauge a person's feelings. Mouth. Body language. Even voice. You could at least have given us a face in this test.
    Microsoft Azure online training
    Selenium online training
    Java online training
    uipath online training
    Python online training


    ReplyDelete
  13. Attend The Python training in bangalore From ExcelR. Practical Python training in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python training in bangalore.
    python training in bangalore

    ReplyDelete
  14. Attend The Data Science Course in Bangalore From ExcelR. Practical Data Science Course in Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Science Course in Bangalore.
    ExcelR Data Science Course in Bangalore

    ReplyDelete
  15. Such great information for blogger iam a professional blogger thanks…Looking for Hadoop Admin Training in Bangalore, learn from Softgen Infotech provide Hadoop Admin Training on online training and classroom training. Join today!

    ReplyDelete
  16. I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post. Hats off to you! The information that you have provided is very helpful.Digital Marketing course in vizag

    ReplyDelete
  17. Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.Digital Marketing course in vizag

    ReplyDelete
  18. You actually make it look so easy with your performance but I find this matter to be actually something which I think I would never comprehend. It seems too complicated and extremely broad for me. I'm looking forward for your next post, I’ll try to get the hang of it!

    machine learning course

    artificial intelligence course in mumbai

    ReplyDelete
  19. it is an amazing blog to explore more

    BEST ANGULAR JS TRAINING IN CHENNAI WITH PLACEMENT

    https://www.acte.in/angular-js-training-in-chennai
    https://www.acte.in/angular-js-training-in-annanagar
    https://www.acte.in/angular-js-training-in-omr
    https://www.acte.in/angular-js-training-in-porur
    https://www.acte.in/angular-js-training-in-tambaram
    https://www.acte.in/angular-js-training-in-velachery


    ReplyDelete

  20. hello sir,
    thanks for giving that type of information. I am really happy to visit your blog.Leading Solar company in Andhra Pradesh

    ReplyDelete
  21. I need to thank you for this particularly fantastic article. I definitely really liked every part of it.Educational Institute in Visakhapatnam.

    ReplyDelete
  22. Such a very useful article. Very interesting to read this article. I would like to thank you for the efforts you had made for writing this awesome article.Cyber Security in Visakhapatnam. Cyber Security near me

    ReplyDelete
  23. PYTHON COURSE IN CHENNAI | INFYCLE TECHNOLOGIES:

    Infycle Technologies is the best Python training in Chennai organization in Chennai and is widely known for its outstanding performance in providing the best software training in Chennai. It is the ultimate goal of Infycle Technologies to provide high-quality software programming training in a 100% safe location and to build a solid career for every individual and young professional in the IT industry. Most importantly, students like 100% hands-on training, which is the specialty of Infycle Technologies. To continue your career on a solid foundation, please contact Infycle Technologies at 7502633633.

    Python coursre in Chennai

    ReplyDelete
  24. Infycle Technologies, the top software training institute and placement center in Chennai offers the Digital Marketing course in Chennai for freshers, students, and tech professionals at the best offers. In addition to the Oracle training, other in-demand courses such as DevOps, Data Science, Python, Selenium, Big Data, Java, Power BI, Oracle will also be trained with 100% practical classes. After the completion of training, the trainees will be sent for placement interviews in the top MNC's. Call 7504633633 to get more info and a free demo.
    Best software training in chennai

    ReplyDelete
  25. Wonderful blog. I am delighted in perusing your articles. This is genuinely an incredible pursuit for me. I have bookmarked it and I am anticipating perusing new articles. Keep doing awesome!
    data analytics course in hyderabad

    ReplyDelete
  26. I needed to leave a little remark to help you and wish you a decent continuation. Wishing you the good luck for all your blogging endeavors. data analytics course in kanpur

    ReplyDelete