I hope you're all doing well. I'm currently working on a PHP project where I need to add a file extension to a PHP variable. However, I'm not quite sure how to accomplish this.
To give you a bit of context, I have a variable called `$filename` which stores the name of a file. Let's say the value of `$filename` is "my_file". What I want to do is append a file extension, let's say ".txt", to this variable so that it becomes "my_file.txt".
Can anyone guide me on how to achieve this? I'd really appreciate any help or suggestions you can provide. Thanks in advance!