FUNKAM35 Posted April 14, 2014 Share Posted April 14, 2014 $places = array("Birmingham","Cornwall","Leeds","London","Manchester"); hi, I have a list of $global in the variables file how do I get these to display in a list I have only done select before when theya re ina table not in a set globals like these Thanks Quote Link to comment Share on other sites More sharing options...
Solution Psycho Posted April 14, 2014 Solution Share Posted April 14, 2014 Not sure what you are really saying. Your code shows you have defined a variable $places as an array. What does the $global variable have to do with it? Create a list echo "<ul>\n"; foreach($places as $place) { echo "<li>{$place}</li>\n"; } echo "<ul>\n"; Quote Link to comment Share on other sites More sharing options...
FUNKAM35 Posted April 14, 2014 Author Share Posted April 14, 2014 Hi, I see dont know why but thought the defined $places as variables was known as $globals Many thanks will try your code Quote Link to comment Share on other sites More sharing options...
FUNKAM35 Posted April 19, 2014 Author Share Posted April 19, 2014 woohoo it works many thanks, learn something new every day on here!! 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.