For smooth functions, this is a version of Whitney's extension theorem.
For analytic functions, the answer is 'no' as already stated in the comments. It's not even true for one point.
For smooth functions, this is a version of Whitney's extension theorem.
For analytic functions, the answer is 'no' as already stated in the comments. It's not even true for one point.