fotobleu Posted March 16, 2011 Share Posted March 16, 2011 hello php masters im trying to do this, and my head has no hair left ;( $res = preg_grep('/[0-9]*$/',array('foto_1','foto_45')); $res does not contain a array full of numbers ??? has anyone run across this before? thanks -danny Quote Link to comment Share on other sites More sharing options...
fotobleu Posted March 16, 2011 Author Share Posted March 16, 2011 apparently i misunderstood the documentation, and "preg_grep" is not supposed to return just the matched parts but returns all the lines that the regex match occurs in, oops 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.