I have a query which gathers values used to create a link...
For example $sth[productname],$sth[productid]
In an effort to create links that are more suitable to search engines, we want the link the look like '/'.$sth[productname].'/'.$sth[productid].'.php" (/widget/123.php)
Because the link structure is not consistent... we need to generate the newly formatted link dynamically.
In order to do this we created a structure field in the database which shows how the new link should be constructed....for instance we'll use productname/productid
We split that field value into an array $new_array = split(",",$field[structure]);
Note that the $new_array elements correspond in name to the $sth array elements.
The question is how to append $sth to each of the $new_array elements to create a string that looks like $sth[new_array[0]].'/'.$sth[new_array[1]] without hard coding it in each file.
This new string then becomes the new link.
Any help is most appreciated.