TheFilmGod Posted August 24, 2008 Share Posted August 24, 2008 echo $error_text[$error_display[0]]; works perfectly correct. But what if I want to use that variable to compare it to a number... how would I evaluate it so the computer can calculate it? this doesn't seem right... or should it work? if ( ($error_text[$error_display[0]]) == 4) { ...} Link to comment https://forums.phpfreaks.com/topic/121157-array-in-an-array/ Share on other sites More sharing options...
Aeglos Posted August 25, 2008 Share Posted August 25, 2008 It will work as long as $error_text[$error_display[0]] is a numeric value... I think you are confusing array keys with array values. Does $error_display[0] hold a numeric value? or the error text?. Link to comment https://forums.phpfreaks.com/topic/121157-array-in-an-array/#findComment-624584 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.