How to Array and search
Moderator: General Moderators
How to Array and search
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.
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: How to Array and search
Give an example of this string.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: How to Array and search
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?
What have you tried so far?