How do I store get_sidebar in a varaible? [duplicate]

get_sidebar() just includes a template, so its as dynamic as the string you pass to it. If you want to capture output and store it all as a variable, use output buffering native to PHP.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)