I have a rather large array that is the result of every server instance running in an IIS server... there are some array values that arent valid domain names and I need to get rid of them... how can I search for a value that doesnt have a '.' in it and subsequently remove that value from the array?
Untested:
$array = array_filter( $array, create_function( '$var', 'return preg_match("/^[^.]\S*\.\S*[^.]$/", trim($str));' ) );
undefined $str
"$str" should be "$var" (or vice versa).
actually i was able to process them out during the array assignment using:
if(!is_bool(strrpos($site->AccountName,"."))) { //add to array }
thanks for the reply nogdog