TheMovieman Posted February 15, 2008 Posted February 15, 2008 Hello once again, lol Don't know what it's called, but I'm having trouble with linking something. Ok, so I've created a page that lists reviews by studio (each one gets their own page), but the way my code is set up, it's not that easy. Here's the code: ><?php $studioinfo = @mysql_query("SELECT ..."); $cat_array = array(); while ($sinfo = mysql_fetch_array($studioinfo)) { $studioid = $sinfo['studioid']; array_push($cat_array, $sinfo['name']); } $cat_string = implode(", ", $cat_array); echo $cat_string; ?> This is to show multiple studios but I don't know how to link it properly. When I tried it, it linked both studios to the same link when there needs to be one for each. Quote
OJB Posted February 17, 2008 Posted February 17, 2008 (edited) try running a foreach() or the $cat_array instead of imploding it! like >foreach($cat_array as $value) { echo $value . '<br/>'; } Edited February 17, 2008 by OJB Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.