Good afternoon.

I'm building a class and am having a bunch of trouble with the PHP
array_keys function. I keep getting these errors:

Warning:  First argument to array_keys() should be an array in D:\Htf.php on
line 33
Warning:  Wrong datatype for second argument in call to in_array in
D:\Htf.php on line 35

$this->ma_arguments IS an array, so why is the error popping up? I did check
syntax but am buffaloe'd by this one.
Just so no one gets confused, I use a form of Hungarian (p=parameter,
m=module, a=array, s=string)

      /**
       * @var assoc array of passed arguments
       */
      var $ma_arguments;

      /**
       * Constructor
       */
      function bmc_html_tag_functions()
      {
        $this->init();
      }

        function init()
        {
                $this->ma_arguments = array();
        }
      /**
       * Checks if the given key or index exists in the array (PHP < 4.1.0)
       *
       * @param $ps_key    Key to check against
       * @param $pa_search Array of elements
       * @return true if key is in array
       * @access private
       */
      function key_exists($ps_key)
      {
        if ( in_array($ps_key, array_keys($this->ma_arguments)) ) {
            return true;
         } else {
            return false;
         }
      }

Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to