<?php foreach($_GET as $x) { echo "$x <br />"; } ?> Lets say we named this file, index.php We put into the address bar: /index.php?name=x&page=y&other=z The code would output: x y z Fine that's very nice, but i would like to known how i can also known the variable name, not just the data handled by variable... like how i can do an - "name x " - "page y" - "other z" ?!
foreach($vector as $easy -> $country){ echo "<br>$country"; foreach($easy as $data -> $location) { echo "<br>$location"; } this is not working
yes man... but take a look i want to process some data with 2 dimensions matrix like $a['country1']['country2']='100km'; got it?!
Even this is not working foreach($vector as $easy){ foreach($easy as $data -> $rank){ echo "$data $rank"; } } Catchable fatal error: Object of class stdClass could not be converted to string in C:\www\g2\easy.php on line 47
Lol, this is a completely different thing, and has nothing to do with your initial question. I gave you the solution to the answer you asked in your first post. If you can't explain what you want, nobody will be able to help. Take a look at my code again. Or even at the link I posted. I'm not going to tell you where your error is, because it's too easy. EDIT: Good job.