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
Post a Comment