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! Quote Link to comment 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??? Quote Link to comment 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 Quote Link to comment 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 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.