thewooleymammoth Posted October 28, 2007 Share Posted October 28, 2007 how can you echo an array that only shows the array if it starts with a certain letter? Link to comment https://forums.phpfreaks.com/topic/75112-solved-alphabetical-order-array/ Share on other sites More sharing options...
Dragen Posted October 28, 2007 Share Posted October 28, 2007 <?php foreach($array as $v)){ if(ereg('^a', $v){ echo $v; } } ?> If it begins with 'a' it will output the variable, otherwise it will move to the next key. Link to comment https://forums.phpfreaks.com/topic/75112-solved-alphabetical-order-array/#findComment-379875 Share on other sites More sharing options...
thewooleymammoth Posted October 28, 2007 Author Share Posted October 28, 2007 awesome thanks Link to comment https://forums.phpfreaks.com/topic/75112-solved-alphabetical-order-array/#findComment-379912 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.