[drupal-devel] What the difference between '==' and '==='
gordon at heydon.com.au
Wed Mar 30 12:30:01 UTC 2005
I was just doing some work, and work some reason the form_select would
select every thing.
Here is what I coded.
form_select('', 'result][' .$payment->txnid, '', array('' => t('select
result'), '1' => t('cleared'), '0' => t('dishonoured'))
And for some reason every option was selected.
I changed line 1329 in common.inc from ($value == $key ? '
selected="selected"' : '')) to ($value === $key ? '
selected="selected"' : '')) and it started working.
Is my form_select call wrong, or is there some difference between == and
Gordon Heydon <gordon at heydon.com.au>
More information about the drupal-devel