devilincarnated Posted March 5, 2010 Share Posted March 5, 2010 'empstatus'=>array('select','empstatus',array(array('','Choose One'), array('Associate','Associate'), array('Government Employee','Government Employee'), array('Partner','Partner'), array('Solo Practice','Solo Practice'), array('Independent Contractor','Independent Contractor'), array('Law Student','Law Student'), array('Other','Other')), array('class'=>"fillin2", 'style'=>"width:200px;"),'empstatus'), could anyone explain me the above code? it was posted for a registration form and this is the employee status... Link to comment https://forums.phpfreaks.com/topic/194214-arrayaa-what-could-be-the-meaning-the-keys-and-values-are-same/ Share on other sites More sharing options...
trq Posted March 5, 2010 Share Posted March 5, 2010 The keys and values are not the same as they are non-associative arrays. Link to comment https://forums.phpfreaks.com/topic/194214-arrayaa-what-could-be-the-meaning-the-keys-and-values-are-same/#findComment-1021809 Share on other sites More sharing options...
devilincarnated Posted March 5, 2010 Author Share Posted March 5, 2010 so what is the meaning of those statements? Link to comment https://forums.phpfreaks.com/topic/194214-arrayaa-what-could-be-the-meaning-the-keys-and-values-are-same/#findComment-1021814 Share on other sites More sharing options...
teamatomic Posted March 5, 2010 Share Posted March 5, 2010 Judging from the content; select,choose one, and the width=200 I would say its used to build a select box. In each array you have 0=>value,1=>option, or the other way. Not a very sensible way but I've seen cludgier. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/194214-arrayaa-what-could-be-the-meaning-the-keys-and-values-are-same/#findComment-1021818 Share on other sites More sharing options...
devilincarnated Posted March 5, 2010 Author Share Posted March 5, 2010 still confusing...no its not that way as they wouldnt have an employee status give out negative value...checked the database... Link to comment https://forums.phpfreaks.com/topic/194214-arrayaa-what-could-be-the-meaning-the-keys-and-values-are-same/#findComment-1021840 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.