My first attempt with PHP, and I have a shopping cart.
I want each item to have a link back to its own product page. So I'm using this
$output[] = '<a href="'.$brand.'/index.php#'.$id.'" target="_blank">';
Unfortunately the $brand doesn't have the same folder name. I need help to write some code that replaces 'this is the first brand' to 'brand-one' for example. Also I have just a few brands, so I can use a line for each operation, no need to think of something that replaces ' ' to '-' for example!
I think this could be something but I don't want the script to rename the values for everything, as they still need to be outputted like 'this is the first brand', with the processed value outputted only on the link.
this is the first brandwithbrand-one, but that's rather specific. How about the second brand?