How to echo error from foreach loop?

Anyone know whats up with my php/ WAMPserver? no error comes up?

  • So I am having trouble as this little bit of php isn't working and I'm not sure if its the WAMP server because no error message comes up. Anyone know whats up? <?php $artists=array('Bon Iver', 'Animal Collective', 'Carly Simon', 'Iron Maiden', 'Real Estate', 'Sonic Youth'); foreach($artists as $item) { echo $item . ' '; } ?>

  • Answer:

    It works fine for me too. I would re-install your server or run through your server to ensure certain aspects of the PHP.ini file are turned on / server is working properly.

Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

It worked for me, so maybe it's your WAMP server? Have you tried <?php phpinfo(); ?> to see if that works?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.