- var_dump: documentation ( source)
- ucfirst: documentation ( source)
- join: documentation ( source)
<?php
$spell = array("double", "toil", "trouble", "cauldron", "bubble");
foreach ($spell as &$word) {
$word = ucfirst($word);
}
var_dump($spell);
foreach ($spell as $word) {
echo join(" ", $spell) . "\n";
}