I have a simple problem and I do not want to write 24 if statements.
I am creating a URL string which requires precise formatting to work. This URL is getting created on the fly based on variables ($Layer1.','.$Layer2.','.$Layer3)
I pass in to create the URL string. The URL string requires a format like this:
The problem lies when I only pass lets say two of the variables. My URL now looks like:
The application accepting this URL is certainly not happing with a leading comma.
FYI - Variables declared as follows:
Any idea how I can get this to work without testing every possible combination?
Thanks in advance,