Ninjakreborn Posted November 20, 2006 Share Posted November 20, 2006 [code]<?phpimplode(", ", $_SESSION['temp']['actiontaken'])?>[/code]This will take an array and put it in a comma seperated list for display, but it's taking the key naturally, I need to find an alternative so I can get the "values" themselves in a comma seperated list. Implode is for the key's in an array, what is for the values in an array. Quote Link to comment Share on other sites More sharing options...
trq Posted November 20, 2006 Share Posted November 20, 2006 What are yo talking about? Implode (used as you have will produce a comma seperated string of the arrays values not keys. eg;[code]<?php $a = array("foo" => "bar", "boo" => "betty"); $x = implode(", ",$a); echo $x; // bar, betty?>[/code] Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted November 20, 2006 Author Share Posted November 20, 2006 Ah thanks, I was using it wrong, thanks again. Quote Link to comment Share on other sites More sharing options...
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.