I am currently working on a PHP project and I need to create a MySQL table with a variable name that includes an underscore. However, I'm not quite sure how to go about doing this. I have tried searching online and in the PHP documentation, but I haven't found a clear answer.
To provide a little context, in my project, I have a variable called $category_name which holds the name of a category. I want to create a new table in my MySQL database for each category, with the table name being the category name itself. For instance, if $category_name is "sports_news", then I would like to create a table named "sports_news" in my database.
I have successfully created tables in MySQL using static table names, but I'm unsure how to proceed when the table name is a variable containing an underscore. Can someone please guide me on how to achieve this?
Any help or suggestions would be greatly appreciated.
Thanks in advance!