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[] = ""; Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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.'; } Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.