Well, first you would need to start out with quotes like this: $item_XYZ = "apple";

You can use a variable in a string like this "I like $item_XYZ" and get "I like apple", because the variable gets interpolated. But as you've probably noticed, you can't do "I like $item_XYZ_4" and get "I like apple_4". The problem is because it thinks that $item_XYZ_4 is a variable. The way around this is to enclose the variable name in curly braceslike this "I like ${item_XYZ}_4". Here's how to open a file using this technique: