MySQL returns a result set: a number of rows, and each row contains a number of columns.
The fetchAll function you're calling is apparently transforming the MySQL result set in a multidimensional array: an array that contains the rows, and each row-element is an array that contains the columns.
In this case, the result is an array of 1 row, that contains an array of 1 column.
To get the number, first of all I'd use an alias in the query:
SELECT MAX(course_id) [B]<font color='"Red"'>AS maxid</font>[/B]
That way it's easier to address it in your code:
$result = getlastCourseTaught($read,$user_id);