I have the 3 versions of what i've tried commented out. none of them work.. what have i done wrong.. help would be greatly appreciated. Thank you.
$patient_link = array(
'patient/demographics/armdme'=>"Patient",
'patient/comment/lookup'=>'Comments',
//if(login::$id='07L'){ echo 'komment'}=>'',
//if (in_array(login::$id, array('007', '0E1', '00D', '011', '02V', '139', '174', '07L', '0FK'))) { echo'komment'}=>'',
//if (in_array(login::$id, array('007', '0E1', '00D', '011', '02V', '139', '174', '07L', '0FK'))) { echo " . komment'=> . ";},
'patient/custom_forms_lookup'=>'Custom Forms',
'patient/eligibility/lookup'=>'Eligibility',
'patient/pmldme/lookup'=>'Encounter',
'patient/event_lookup'=>'Events',
'patient/history/lookup'=>'History',
'patient/image/lookup'=>'Images',
'patient/reorder/lookup'=>'Reorder');
I'm guessing this is what you meant? I cleaned up the formatting and had some pieces left over when I was done... what is the 007
, 0E1
part for?
<?php
$patient_link = array(
'patient/demographics/armdme' => 'Patient',
'patient/comment/lookup' => 'Comments',
'patient/custom_forms_lookup' => 'Custom Forms',
'patient/eligibility/lookup' => 'Eligibility',
'patient/pmldme/lookup' => 'Encounter',
'patient/event_lookup' => 'Events',
'patient/history/lookup' => 'History',
'patient/image/lookup' => 'Images',
'patient/reorder/lookup' => 'Reorder'
);
// What are these for??
// array('007', '0E1', '00D', '011', '02V', '139', '174', '07L', '0FK'),
To conditionally add items do it like this:
<?php
$patient_link = array(
'patient/demographics/armdme' => 'Patient'
);
if(in_array(login::$ida, array('007', '0E1', '00D', '011', '02V', '139', '174', '07L', '0FK'))) {
$patient_link['patient/comment/lookup'] = 'Comments';
}
$patient_link['patient/custom_forms_lookup'] = 'CustomForms';
$patient_link['patient/eligibility/lookup'] = 'Eligibility';
$patient_link['patient/pmldme/lookup'] = 'Encounter';
$patient_link['patient/event_lookup'] = 'Events';
$patient_link['patient/history/lookup'] = 'History';
$patient_link['patient/image/lookup'] = 'Images';
$patient_link['patient/reorder/lookup'] = 'Reorder';
Use the $array[$key] = $value
syntax to add items to an array after you've defined it.