Thanks guys! This is working now.
PHP Code:
test() 

    
level endon("boot"); 
    
setCvar("g_test2",""); 
    while(
1
    { 
        if(
getcvar("g_test2") != ""
        {     
            
nameString getcvar("g_test2");
            
info strTok(nameString" "); 
            
name1 getnormalname(info[0]); 
        if(
info.size >= 2)
           
name2 info[1];
        else   
                
name2 "no reason"
        
iprintlnbold("info1: "+name1+" , info2: "+name2);  
            
player_to_kick undefined
            
player_warn undefined
            
players getentarray("player","classname"); 
            for(
i=0;i<players.size;i++) 
            { 
                
name getnormalname(players[i].name); 
                if(
name == name1 || isSubStr(namename1)) 
                    
player_to_kick players[i]; 

            } 
            if(!
isDefined(player_to_kick))
        {
                
setcvar("g_test2""");
        
iprintlnbold("no player");
        
wait 0.05;  
                continue; 
        }
         
            
player_to_kick iprintlnbold("You are kicked\nREASON: "+name2); 
            
setcvar("g_test2"""); 
        } 
    
wait 1
    } 

One more problem I cant figure out is to do it if people have the same name. If I tests with bots it will return the latest bot.
However I wanted to make if there are multiple players it should return a message with "multiple players, player 1 name: + id, player 2 name + id"

I was thinking just to keep the players in an array, but I cant get that working. Can somebody point me in the right direction?