Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //$voice_vlan = parse_datas(array('line'=>$ligne,'regexp'=>'/VoIP VLAN Reply: (.*)/i'));
- function parse_datas($params=array('line'=>'','regexp'=>'')) {
- $line = $params['line'];
- $regexp = $params['regexp'];
- $correspondances = array();
- $resultat = '';
- if (preg_match_all($regexp, $line, $correspondances, PREG_SET_ORDER)) {
- foreach ($correspondances as $correspondance) {
- $resultat = trim($correspondance[1]);
- }
- }
- return $resultat;
- }
Add Comment
Please, Sign In to add comment