Voting

: two plus two?
(Example: nine)

The Note You're Voting On

Chris
12 years ago
Another way to display arrays is use an array_walk(). This can be useful inline echo/print where a foreach wouldn't work, e.g.

<?php
echo "These errors: ", (unset)array_walk($msgs, function($a) { echo "<p>$a</p>"; } ), "must be corrected.";
?>

<< Back to user notes page

To Top