Displaying a greeting to one user selected from a database
The question is I know the size of the $getUser array to always be one.


No you don't. You assume it is - and it's probably a safe assumption to make. But actually knowing that user_id is a primary key is the job of the underlying database, not of your application.

You would know that 1 record is returned, if the query you send to the database says "give me one record where user_Id is equal to..." - if your backend is mysql that's done with a LIMIT clause.

Your query is missing a terminating semicolon... but the worst offense is the concatenation of the .$user_id into the WHERE clause. Where's that value coming from? Is there any slightest chance that it might not be containing the value you're expecting, and that concatenating it could result in unexpected SQL statements being injected into your query? If that's the case, then your query might actually be returning all rows, not just one.

See give me parameterized SQL, or give me death! (or many, many, many other online resources) for more details.