I need to make a function that reads my variables at the top and fixes the string so that each word in it has a capital letter. The way I'm currently doing it doesn't seem to work. Here is what I have:
<?php
$course1 = "advanced web development";
$course2 = "mobile app development";
$course3 = "info systems with business intell";
function fixCourseName($courseName) {
$courseName = ucwords($courseName);
}
fixCourseName($course1);
echo $course1;
?>
Does anyone know what would be causing the output to still be lower case?