Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $query = tep_db_query("SELECT countries_name, countries_id FROM " . TABLE_COUNTRIES);
- $countries = array();
- while($row = tep_db_fetch_array($query))
- {
- $countries[$row['countries_id']] = $row['countries_name'];
- }
- $country = NULL;
- foreach($countries as $id => $name)
- {
- if($countryname == $name)
- {
- $country = $id;
- // A die happens here. So it breaks.
- break;
- }
- }
- die($country); // This dies but nothing gets printed when it should print an ID.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement