This should be REALLY simple but unfortunately my PHP is for shit so I'm asking for a little help.
What I'm trying to accomplish is essentially just to have two phrases in different places on a site that are tied together so the correct pair of phrases displays together. However, I have about 10 pairs of the phrases that I want to rotate randomly.
For instance, if 'Apple' displays in the first instance I want 'Fruit' to display down the page. If 'Can' is displayed, it should say 'Aluminum' in the second location. But I obviously don't want 'Apple' then 'Aluminum'.
Also, I'm trying to pull the data from a txt file elsewhere on my site.
I've tried a number of ways but as I said my PHP skills suck. I've tried using an associative array but am not figuring out how to pull the index and value separately. I've also tried tying the second phrase to the numerical value PHP assigns the first from an array, then pulling the same numerical item from a second array. It seems either of these would work if I knew how.
A little help, please....
Thanks in advance for any assistance.
What I'm trying to accomplish is essentially just to have two phrases in different places on a site that are tied together so the correct pair of phrases displays together. However, I have about 10 pairs of the phrases that I want to rotate randomly.
For instance, if 'Apple' displays in the first instance I want 'Fruit' to display down the page. If 'Can' is displayed, it should say 'Aluminum' in the second location. But I obviously don't want 'Apple' then 'Aluminum'.
Also, I'm trying to pull the data from a txt file elsewhere on my site.
I've tried a number of ways but as I said my PHP skills suck. I've tried using an associative array but am not figuring out how to pull the index and value separately. I've also tried tying the second phrase to the numerical value PHP assigns the first from an array, then pulling the same numerical item from a second array. It seems either of these would work if I knew how.
A little help, please....
Thanks in advance for any assistance.