php - Function gets printed twice -


i made function, same result printed twice. idea why? function? can't find wrong it.

$valid array.

function validoutput($output, $valid, $name, $mirror){                 foreach($valid $e) {                     if(strpos($output, $e) != false) {                         echo '<br />' . $name . '<br />';                         echo '<textarea cols=100 rows=10>';                         echo '[tab: mirror' . $mirror . ']';                         echo $output;                         echo "</textarea>";                      }                 } } 

please tell me if see wrong it, thanks.

edit:

$valid = array("facebook", "fbcdn", "megavideo", "video", "videoweed", "4shared"); 

$valid has 2 elements substrings of $output

can show sample inputs? maybe explain motivation behind $valid parameter is?


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -