I have two comma delimited lists corresponding to the Ids and values of something returned by a query. I can easily convert each into an array using explode.
My question is how can I convert the two lists into a set of hyperlinks that use one from each as follows:
Ids: 34,23,78
Values: red, blue, green
Links: <a href='get.php?id=34'>red</a> etc.
I can use:
$valuesarray =explode(',',$values);
foreach($valuesarray as $val) {
Echo ....$Val
}
But how do I get the Ids into the link?