I have a system for fetching templates from a database and showing them on my website, but in my function, I have to define every variable that is in the template. Here is my function and me showing the template below it.
You see, $board[boardname] is in my template in the MySQL database. I want to be able to just run the function without having to define the board[boardname] variable inside the function. This would allow me to use my templates more efficiently so I don't have to define everything inside my template function.
Is there anyway to do this while still showing the correct variable even though it is defined outside the function?