All pastes #231662 Raw Edit

lol

public php v1 · immutable
#231662 ·published 2006-10-31 23:03 UTC
rendered paste body
#### My function:if (!function_exists('find_bot')) {  function find_bot($botname,$array) {    $result = false;	foreach ($array as $key => $value) { 	  if(!isset($result) && $value['botname'] == $botname) {		$result = $key;	  }	} 	if(!isset($result)) {	  return false;	} else {	  return $result;	}  }  $functions['core'][] = 'find_bot';}#### my call$name = find_bot($target2[0],$service);## values : $target2[0] = CtrlServ## service array:Array(    [ctrl] => Array        (            [botname] => CtrlServ            [commands] => Array                (                )            [restrict] => o        )    [proxy] => Array        (            [botname] => ProxyServ            [commands] => Array                (                )            [restrict] =>        ))