I'm just learning PHP now so I don't know of all the possibilities and stuff. If I have this in the code:
<?php foreach ($languages as $language) { ?>
Bunch of fields here
<?php } ?> [/PHP]
That returns a bunch of fields for every language there is. In this case, there's two languages, 1 and 2. How do I change that foreach statement so it only returns where $languages = "2"? I tried messing with WHERE but had no luck. I don't even know if WHERE could be used the way I tried to. lol
Question
Zenicanin
I'm just learning PHP now so I don't know of all the possibilities and stuff. If I have this in the code:
That returns a bunch of fields for every language there is. In this case, there's two languages, 1 and 2. How do I change that foreach statement so it only returns where $languages = "2"? I tried messing with WHERE but had no luck. I don't even know if WHERE could be used the way I tried to. lol
Link to comment
Share on other sites
3 answers to this question
Recommended Posts