BRADERY Posted February 6, 2011 Share Posted February 6, 2011 It echos that there are to many.. how would I do this Saying like if I had 100 $Variable[] it would echo that there are to many? $Variable[] = ""; $Variable[] = ""; $Variable[] = ""; $Variable[] = ""; $Variable[] = ""; $Variable[] = ""; Link to comment https://forums.phpfreaks.com/topic/226852-if-more-than-100-variables/ Share on other sites More sharing options...
Pikachu2000 Posted February 6, 2011 Share Posted February 6, 2011 What? Are you saying that you're getting an error, or that you want to echo a message if there are over a certain number of array elements? Link to comment https://forums.phpfreaks.com/topic/226852-if-more-than-100-variables/#findComment-1170531 Share on other sites More sharing options...
BRADERY Posted February 6, 2011 Author Share Posted February 6, 2011 echo a message if there are over a certain number of array elements? This.. Sorry im a noob lol Link to comment https://forums.phpfreaks.com/topic/226852-if-more-than-100-variables/#findComment-1170535 Share on other sites More sharing options...
Pikachu2000 Posted February 6, 2011 Share Posted February 6, 2011 You can use count to count the number of array elements. if( count($array) > 100 ) { echo 'Your message here.'; } Link to comment https://forums.phpfreaks.com/topic/226852-if-more-than-100-variables/#findComment-1170537 Share on other sites More sharing options...
BRADERY Posted February 6, 2011 Author Share Posted February 6, 2011 something so simple I cannot figure out.. I didnt think of count(); thanks Link to comment https://forums.phpfreaks.com/topic/226852-if-more-than-100-variables/#findComment-1170538 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.