Page 1 of 1

How to Array and search

Posted: Tue Mar 30, 2010 4:09 am
by baoky
i wanna ask about , in my situation i have a big chunk of string, e string contain several video path such as http://domain.com/something.flv and http://domain.com/something.mp4 , i wanna grab all substring in e string($content) that start with http and end with either.flv or .mp4 , add them to array, and do a loop to call array index 0 to index n base on the array size.

Re: How to Array and search

Posted: Tue Mar 30, 2010 8:46 am
by AbraCadaver
Give an example of this string.

Re: How to Array and search

Posted: Tue Mar 30, 2010 10:28 am
by RobertGonzalez
There are lots of things you can do with this. You can use array_map, you can walk/loop the array or push the array into a match/replace function along with a callback function to do what you want.

What have you tried so far?