public function channelGetLevel($cid)
  {
    $channel = $this->channelGetById($cid);
    $levelno = 0;

    if($channel["pid"])
    {
      $levelno = $this->channelGetLevel($channel["pid"])+1;
    }

    return $levelno;
  }
public function channelGetLevel($cid)
  {
    $channel = $this->channelGetById($cid);
    $levelno = 0;

    if($channel["pid"])
    {
      $levelno = $this->channelGetLevel($channel["pid"])+1;
    }

    return $levelno;
  }
public function channelGetLevel ( $ cid ) { $ channel = $ this -> channelGetById ( $ cid ) ; $ levelno = 0 ; if ( $ channel [ "pid" ] ) { $ levelno = $ this -> channelGetLevel ( $ channel [ "pid" ] ) + 1 ; } return $ levelno ; }
Returns the level of a channel.

@param  integer $cid
@return integer
Returns the level of a channel .