<?php $course1 = "advanced web development"; $course2 = "mobile app development"; $course3 = "info systems with business intell"; // Pass by reference function fixCourseName(&$courseName) { $courseName = ucwords($courseName); } fixCourseName($course1); echo $course1; echo "\n"; // Prints a newline // Return the new value function fixCourseName_two($courseName) { return ucwords($courseName); } $course2 = fixCourseName_two($course2); echo $course2; echo "\n"; // Prints a newline // Using the ucwords() directly echo ucwords($course3);
You have javascript disabled. You will not be able to edit any code.