Hi everybody, just starting with PHP, but been programming for a while.
Can you use a variable to define an attribute? I was looking for something like a picture slider and I thought it would be easy to do a for next loop, just changing the value of the ‘src’ attribute each time. I haven’t done it yet but I’d set up an array of strings using the path of each picture for the elements and then set $x to iterate thru the array and put an line in the loop. I’d set the src attribute to $pic(x$) or something like that, if it’s possible. I’ve used the structure in other languages many times, but the question remains, can I use the variable to define an attributes value?
Thanx so much for any help on this, oh great and knowledgeable ones!!!