foreach not displaying properly in table

By: Jeff Dick | Asked: 02/10/2023
ForumsCategory: Code Helpforeach not displaying properly in table
Jeff DickJeff Dick asked 2 years ago
Hello there!   Trying to figure out what I am doing wrong when it comes to using the foreach command to get a repeater to display values in separate rows in a table.   When I put in the code as shows in the tutorial in an email template, it seems to auto-fix (or break in this case) it to something else by adding it in it's own <tr>.  
  • I attached some screenshots.  The first is how I am adding the code in text view.  
  • The second screen shot is what it updates the code to after I click Update.  
  • The third is how it is displaying in Visual view after the update.  
As you can see in the last shot, having that code right next to each other will obviously not trigger the foreach command.   I feel there is something simple I am missing here, but can't seem to figure it out.  
Attachments
1 Answers
Victor Font answered 2 years ago

The first example is correct albeit there’s more HTML than you need. What’s the point of the nested spans? You could add the in-line CSS to the td tag. And I don’t what you mean  when you say “it seems to auto-fix (or break in this case) it to something else by adding it in it's own <tr>” Can you be more specific?

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right