dreamkiller23 Posted March 12, 2008 Share Posted March 12, 2008 <?php function rev_arr($arr){ $cou=count($arr); $returned_array=array(); for($i=$cou-1;$i>=0;$i--) { $returned_array[]=$arr[$i]; } echo "$returned_array"; } $b=array(21,6,12); $e=rev_arr($b); echo "$e"; ?> Okay so what i'm trying to do is to pickup an in string like $instr= aBc35k5 my function will putput c3 and k5 i tried working the code in revers order but that doesn't seem to help me in string can be any series of letter and digits Please help! Link to comment https://forums.phpfreaks.com/topic/95819-working-on-picking-up-letters-and-digits-in-an-array/ Share on other sites More sharing options...
craygo Posted March 12, 2008 Share Posted March 12, 2008 Not really sure what you want to do here What do the 21,6,12 mean??? Link to comment https://forums.phpfreaks.com/topic/95819-working-on-picking-up-letters-and-digits-in-an-array/#findComment-490542 Share on other sites More sharing options...
dreamkiller23 Posted March 12, 2008 Author Share Posted March 12, 2008 no that's just a snippe of what i was working on. i want it to just print out the letter followed byt the number Link to comment https://forums.phpfreaks.com/topic/95819-working-on-picking-up-letters-and-digits-in-an-array/#findComment-490546 Share on other sites More sharing options...
craygo Posted March 12, 2008 Share Posted March 12, 2008 so you want to only print out values where a letter is followed by a number?? Correct Link to comment https://forums.phpfreaks.com/topic/95819-working-on-picking-up-letters-and-digits-in-an-array/#findComment-490549 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.