If your theme has garbage code like that at the end of it, you need to decode it and replace it with normal code instead. A lot of crap themes include stuff like this in order to attempt to prevent people from removing links back to the theme author and such.
Here’s how to undo these forms of encoding, on a general basis:
1. Copy the section of code that contains the garbage into a new file. Call it temp.php or something.
2. Execute the temp.php file.
3. Copy and paste the output it produces over the garbage code.
So, for example, if I take Huldremor’s code above and put it in a new file and run it, it produces this:
<div id="footer">
designed by: <a href="https://www.makequick.com">Online Website Builder</a> and: <a href="https://www.webhostinggeeks.com">Web Hosting </a>Geeks | available free at: Top<a href="https://www.topwpthemes.com"> WordPress Themes</a>
</div>
</div>
That can be used to replace the garbage code. Then it can even be edited to remove those links and such, if desired.
Sometimes this general method won’t work, especially when the code has an “eval” in it. The solution here is to replace the “eval” with an “echo” and see what it produces instead. This will produce code which can often replace the old code as well.
Better yet, if you find a theme with code like this in it: DON’T USE IT. Themes should never try to hide code from you, and any theme using code-hiding methods is automatically untrustworthy. Do not use themes with this stuff in it, do not use websites with themes like these on them. Go somewhere else. Go to the official themes repository instead.