drmsolutions
Programmer
Hi there,
I'm passing values to a function, but am finding the value of 'highlight_id' below is not set. I'm only new to PHP so am thinking I've done something wrong, but can't work out what?
$Resultset['Title'] definitely has a value, as I've printed it to test, but 'highlight_id' has not been set to the same value as $Resultset['Title'].
$Resultset['Title'] is set further up in the script:
I actually got this script from someone else and they originally set 'highlight_id' => 4
I'm changing it as I want the listbox to select the value that is contained in the record it has retrieved rather than a static value.
I hope that makes sense?
I'm passing values to a function, but am finding the value of 'highlight_id' below is not set. I'm only new to PHP so am thinking I've done something wrong, but can't work out what?
Code:
<? enhanced_list_box(array(
table' => 'ctitle',
'id_field' => 'id',
'value_field' => 'title',
'highlight_id' => $Resultset['Title']));
$Resultset['Title'] definitely has a value, as I've printed it to test, but 'highlight_id' has not been set to the same value as $Resultset['Title'].
$Resultset['Title'] is set further up in the script:
Code:
$Resultset = $MyDb->f_GetRecord($Result);
I actually got this script from someone else and they originally set 'highlight_id' => 4
I'm changing it as I want the listbox to select the value that is contained in the record it has retrieved rather than a static value.
I hope that makes sense?