In a separate file is stored an array of specialties and doctors. The information is entered into the database: the specialty is a word (line) and the doctor is a number. How to make, that at sampling of records from a DB, instead of digit, the name of the doctor was substituted?

$listt= array ( 'Педиатр' => array ( 0 => 'Ольга Ганжа', 1 => 'Александра Смердова', 2 => 'Елена Гусева', ), 'Терапевт' => array ( 0 => 'Владимир Райко', 1 => 'Кудайбердиева Анар', 2 => 'Валентина Бочанова', 3 => 'Татьяна Кочеткова', ), 'Хирург' => array ( 0 => 'Андрей Сверидюк', 1 => 'Николай Никитин', ) ); 
  • SELECT id_врача AS name - and then use name in array keys - Edward
  • And where does any file with specialties? and what array is in question? специальность словом (строкой) а врач - цифрой - and why in the database in this format is stored information? - Alexey Shimansky
  • Understand with join. To help you, you need to know the structure of the tables - Oboroten

0