Well, I am a front end guy, but I have an interest in everything so i am trying to figure out how to use PHP for some mundane tasks...basically what i want to do is split a list (delimited by a comma) and insert the values of the list into params/attribute in so i only have to copy paste a list once instead of the thousands of urls over and over...Here is where i got stuck:
// need to loop through the array here...don't know how...i was thinking a for or while loop..?? echo '<a href="' . thearrayitem[0] . '>' . thearrayitem[0] . '</a>'; } ?>
Except "thearrayitem[0]" should be the index as a variable so it can iterate through the items... Any help would be much appreciated thanks gin advance!
Except "thearrayitem[0]" should be the index as a variable so it can iterate through the items...
Any help would be much appreciated thanks gin advance!
this is what i have now...im getting an undefined offset error, but $i should be set....unless my loop is failing???
Instead of trying to use the index, simply use a foreach loop and use the value like so: