Make an array filterable per hook

If you want to make the array filterable, use apply_filters() and add_filter(). Also, you have to pass the array as an argument to apply_filters() and expect it in your callback that is changing that array. Here is a basic example with slightly more meaningful names: First we have a function that is running over an … Read more

foreach loop still echoes array

OK, so this is what I did wrong. This was an array within an array, which meant that I had to use the element index to echo the values. I’m not even sure I’m explaining it right, but thanks for your help all. It’s working now.