php - Combine array values to a clickable link -
hi got problem. made wishlist outputs result array selected value example
array ( [product_name] => 1 [testartikel 1] => 2 [testartikel 4] => 5)
its not right output how can put out values this
<a href="1">product_name</a> <a href="2">testartikel 1</a> <a href="5">testartikel 4</a>
my output array 1 actuallay
<?php session_start(); print_r($_session['orders']); ?>
and items generated in wlscript.php file looks
<?php session_start(); if (is_array($_session['orders'])) { $orders = $_session['orders']; } $p = trim($_post['wlproduct']); $q = trim($_post['wlproducturl']); $orders[$p] = $q; $_session['orders'] = $orders; ?>
if want make session array output links, can use code:
foreach ($_session['orders'] $row => $link) { echo '<a href="' . $link . '">' . $row . '</a>'; }
output 3 links in format write.
Comments
Post a Comment