List Info

Thread: Class Construction in PHP




Class Construction in PHP
user name
2007-05-24 08:29:12
Hello,

I use the following commands to work with arrays:
$array = array("Test"; => 123,
        ;           ;  "Abc"  => 456);
//Extract array values into vars with the same name of the keys in lower case
extract(array_change_key_case($array, CASE_LOWER), EXTR_PREFIX_SAME, "");

However, i'd like to do this using a OO Class (I'm a begginer in OO).

So, i do this:

class CArray {
   ;   var $Array;

      function CArray($arr) {
   ;       $this->Array = $arr;
      }
   ;      function Extract()  {
   ;       extract(array_change_key_case($this->Array, CASE_LOWER), EXTR_PREFIX_SAME, "");
      }
}

$arr = new Array($array);
$arr->Extract();

Nothing happend... not even an error. What is wrong in this class?

--
"Omnia si perdas, famam servare memento"
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Re: Class Construction in PHP
user name
2007-05-24 10:03:12


$arr = new CArray($array);


On 5/24/07, Ralph Rassweiler < ralphrassgmail.com">ralphrassgmail.com> wrote:
Hello,

I use the following commands to work with arrays:
$array = array(&quot;Test"; => 123,
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;  "Abc&quot;  => 456);
//Extract array values into vars with the same name of the keys in lower case
extract(array_change_key_case($array, CASE_LOWER), EXTR_PREFIX_SAME, "&quot;);

However, i'd like to do this using a OO Class (I'm a begginer in OO).

So, i do this:

class CArray {
   ; &nbsp; var $Array;

 &nbsp; &nbsp;  function CArray($arr) {
   ; &nbsp; &nbsp; &nbsp; $this->Array = $arr;
&nbsp; &nbsp;   }
   ; &nbsp; &nbsp;  function Extract()&nbsp; {
   ; &nbsp; &nbsp; &nbsp; extract(array_change_key_case($this->Array, CASE_LOWER), EXTR_PREFIX_SAME, "&quot;);
&nbsp; &nbsp; &nbsp; }
}

$arr = new Array($array);
$arr->Extract();

Nothing happend... not even an error. What is wrong in this class?

--
"Omnia si perdas, famam servare memento&quot;




--
Sem mais para o momento,
Rodrigo Souza

--------------------------------------------------------------------------------
:: Rodrigo Souza dos Santos
:: Curitiba - Paraná - Brasil
:: rodrigosouzadossantosgmail.com">rodrigosouzadossantosgmail.com
--------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Re: Class Construction in PHP
country flaguser name
Costa Rica
2007-05-24 10:03:35

You don’t have a constructor, in PHP the constructors syntax are something like this:

 

Class CArray{

 &nbsp; &nbsp;  Var $Array;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; function __construct($arr){

 &nbsp; &nbsp; &nbsp; &nbsp;   ; $this->Array = $arr;

 &nbsp; &nbsp;  }

 

...

 

It’s different of java ;)

 

--

Wilkin

 


class CArray {
 &nbsp;   ; var $Array;

&nbsp; &nbsp; &nbsp; function CArray($arr) {
 &nbsp;   ; &nbsp; &nbsp; $this->Array = $arr;
 &nbsp;   ; }
 &nbsp;   ; &nbsp;  function Extract()&nbsp; {
 &nbsp;   ; &nbsp; &nbsp; extract(array_change_key_case($this->;Array, CASE_LOWER), EXTR_PREFIX_SAME, &quot;");
 &nbsp;   ; }
}

$arr = new Array($array);
$arr-&gt;Extract();

Nothing happend... not even an error.
What is wrong in this class?


--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Re: Class Construction in PHP
user name
2007-05-24 11:26:38
Hey,

I use the constructor "__construct&quot;, but no good:

class CArray {
 &nbsp;   &nbsp;  var $Array;
&nbsp; &nbsp;  &nbsp; 
 &nbsp;   &nbsp;  function __construct($arr) {
 &nbsp;   &nbsp;   &nbsp;  $this->Array = $arr;
&nbsp; &nbsp;  &nbsp;  }
   ;  &nbsp; 
 &nbsp;   &nbsp;  function Extract() {
 &nbsp;   &nbsp;   &nbsp;  extract(array_change_key_case($this->Array, CASE_LOWER), EXTR_PREFIX_SAME, "&quot;);
   ;  &nbsp;  }
}

$ar = new CArray($array);
$ar-&gt;Extract();

What&#39;s wrong?


On 5/24/07, Wilkin Melendez < wilkinwmelendez.com">wilkinwmelendez.com> wrote:

You don't have a constructor, in PHP the constructors syntax are something like this:

 

Class CArray{

 &nbsp; &nbsp;  Var $Array;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; function __construct($arr){

 &nbsp; &nbsp; &nbsp; &nbsp;   ; $this->Array = $arr;

 &nbsp; &nbsp;  }

 

...

 

It's different of java ;)

 

--

Wilkin

 


class CArray {
 &nbsp;   ; var $Array;

&nbsp; &nbsp; &nbsp; function CArray($arr) {
 &nbsp;   ; &nbsp; &nbsp; $this->Array = $arr;
 &nbsp;   ; }
 &nbsp;   ; &nbsp;  function Extract()&nbsp; {
 &nbsp;   ; &nbsp; &nbsp; extract(array_change_key_case($this->;Array, CASE_LOWER), EXTR_PREFIX_SAME, &quot;");
 &nbsp;   ; }
}

$arr = new Array($array);
$arr-&gt;Extract();

Nothing happend... not even an error.
What is wrong in this class?






--
"Omnia si perdas, famam servare memento&quot;
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Re: Class Construction in PHP
user name
2007-05-24 12:17:20
"function CArray($arr)" == "function __construct($arr )"
but
"function __construct($arr )" work only in  PHP 5


The problem was only that Array does not exist in PHP!!!!!!!!!



On 5/24/07, Ralph Rassweiler < ralphrassgmail.com">ralphrassgmail.com> wrote:
Hey,

I use the constructor "__construct&quot;, but no good:

class CArray {
 &nbsp;   &nbsp;  var $Array;
&nbsp; &nbsp;  &nbsp; 
 &nbsp;   &nbsp;  function __construct($arr) {
 &nbsp;   &nbsp;   &nbsp;  $this->Array = $arr;
&nbsp; &nbsp;  &nbsp;  }
   ;  &nbsp; 
 &nbsp;   &nbsp;  function Extract() {
 &nbsp;   &nbsp;   &nbsp;  extract(array_change_key_case($this->Array, CASE_LOWER), EXTR_PREFIX_SAME, "&quot;);
   ;  &nbsp;  }
}

$ar = new CArray($array);
$ar->Extract();

What's wrong?


On 5/24/07, Wilkin Melendez < wilkinwmelendez.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> wilkinwmelendez.com> wrote:

You don't have a constructor, in PHP the constructors syntax are something like this:

 

Class CArray{

 &nbsp; &nbsp;  Var $Array;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; function __construct($arr){

 &nbsp; &nbsp; &nbsp; &nbsp;   ; $this->Array = $arr;

 &nbsp; &nbsp;  }

 

...

 

It's different of java ;)

 

--

Wilkin

 


class CArray {
 &nbsp;   ; var $Array;

&nbsp; &nbsp; &nbsp; function CArray($arr) {
 &nbsp;   ; &nbsp; &nbsp; $this->Array = $arr;
 &nbsp;   ; }
 &nbsp;   ; &nbsp;  function Extract()&nbsp; {
 &nbsp;   ; &nbsp; &nbsp; extract(array_change_key_case($this->;Array, CASE_LOWER), EXTR_PREFIX_SAME, &quot;");
 &nbsp;   ; }
}

$arr = new Array($array);
$arr-&gt;Extract();

Nothing happend... not even an error.
What is wrong in this class?






--
"Omnia si perdas, famam servare memento&quot;




--
Sem mais para o momento,
Rodrigo Souza

--------------------------------------------------------------------------------
:: Rodrigo Souza dos Santos
:: Curitiba - Paraná - Brasil
:: rodrigosouzadossantosgmail.com">rodrigosouzadossantosgmail.com
--------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Re: Class Construction in PHP
user name
2007-05-24 12:21:59
SORRY!!!!

"function CArray($arr)" == "function __construct(
$arr )"
both equals function
both notations function


but
"function __construct($arr )" work only in  PHP 5



The problem was only that "new Array"; does not exist in PHP!!!!!!!!!




On 5/24/07, Rodrigo Souza < rodrigosouzadossantosgmail.com"> rodrigosouzadossantosgmail.com> wrote:
"function CArray($arr)" == "function __construct( $arr )"
but
"function __construct($arr )" work only in  PHP 5


The problem was only that Array does not exist in PHP!!!!!!!!!



On 5/24/07, Ralph Rassweiler < ralphrassgmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ralphrassgmail.com> wrote:
Hey,

I use the constructor "__construct&quot;, but no good:

class CArray {
 &nbsp;   &nbsp;  var $Array;
&nbsp; &nbsp;  &nbsp; 
 &nbsp;   &nbsp;  function __construct($arr) {
 &nbsp;   &nbsp;   &nbsp;  $this->Array = $arr;
&nbsp; &nbsp;  &nbsp;  }
   ;  &nbsp; 
 &nbsp;   &nbsp;  function Extract() {
 &nbsp;   &nbsp;   &nbsp;  extract(array_change_key_case($this->Array, CASE_LOWER), EXTR_PREFIX_SAME, "&quot;);
   ;  &nbsp;  }
}

$ar = new CArray($array);
$ar->Extract();

What's wrong?


On 5/24/07, Wilkin Melendez < wilkinwmelendez.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> wilkinwmelendez.com> wrote:

You don't have a constructor, in PHP the constructors syntax are something like this:

 

Class CArray{

 &nbsp; &nbsp;  Var $Array;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; function __construct($arr){

 &nbsp; &nbsp; &nbsp; &nbsp;   ; $this->Array = $arr;

 &nbsp; &nbsp;  }

 

...

 

It's different of java ;)

 

--

Wilkin

 


class CArray {
 &nbsp;   ; var $Array;

&nbsp; &nbsp; &nbsp; function CArray($arr) {
 &nbsp;   ; &nbsp; &nbsp; $this->Array = $arr;
 &nbsp;   ; }
 &nbsp;   ; &nbsp;  function Extract()&nbsp; {
 &nbsp;   ; &nbsp; &nbsp; extract(array_change_key_case($this->;Array, CASE_LOWER), EXTR_PREFIX_SAME, &quot;");
 &nbsp;   ; }
}

$arr = new Array($array);
$arr-&gt;Extract();

Nothing happend... not even an error.
What is wrong in this class?






--
"Omnia si perdas, famam servare memento&quot;




--
Sem mais para o momento,
Rodrigo Souza

--------------------------------------------------------------------------------
:: Rodrigo Souza dos Santos
:: Curitiba - Paraná - Brasil
:: rodrigosouzadossantosgmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rodrigosouzadossantosgmail.com
--------------------------------------------------------------------------------



--
Sem mais para o momento,
Rodrigo Souza

--------------------------------------------------------------------------------
:: Rodrigo Souza dos Santos
:: Curitiba - Paraná - Brasil
:: rodrigosouzadossantosgmail.com">rodrigosouzadossantosgmail.com
--------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Re: Class Construction in PHP
user name
2007-05-24 12:25:37

Sorry, i don't get it.

I';m Using PHP 5.1.4.


On 5/24/07, Rodrigo Souza < rodrigosouzadossantosgmail.com">rodrigosouzadossantosgmail.com > wrote:
SORRY!!!!

"function CArray($arr)" == "function __construct(
$arr )"
both equals function
both notations function


but
"function __construct($arr )" work only in  PHP 5



The problem was only that "new Array"; does not exist in PHP!!!!!!!!!




On 5/24/07, Rodrigo Souza < rodrigosouzadossantosgmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> rodrigosouzadossantosgmail.com> wrote:
"function CArray($arr)" == "function __construct( $arr )"
but
"function __construct($arr )" work only in  PHP 5


The problem was only that Array does not exist in PHP!!!!!!!!!



On 5/24/07, Ralph Rassweiler < ralphrassgmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ralphrassgmail.com> wrote:
Hey,

I use the constructor "__construct&quot;, but no good:

class CArray {
 &nbsp;   &nbsp;  var $Array;
&nbsp; &nbsp;  &nbsp; 
 &nbsp;   &nbsp;  function __construct($arr) {
 &nbsp;   &nbsp;   &nbsp;  $this->Array = $arr;
&nbsp; &nbsp;  &nbsp;  }
   ;  &nbsp; 
 &nbsp;   &nbsp;  function Extract() {
 &nbsp;   &nbsp;   &nbsp;  extract(array_change_key_case($this->Array, CASE_LOWER), EXTR_PREFIX_SAME, "&quot;);
   ;  &nbsp;  }
}

$ar = new CArray($array);
$ar->Extract();

What's wrong?


On 5/24/07, Wilkin Melendez < wilkinwmelendez.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> wilkinwmelendez.com> wrote:

You don't have a constructor, in PHP the constructors syntax are something like this:

 

Class CArray{

 &nbsp; &nbsp;  Var $Array;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; function __construct($arr){

 &nbsp; &nbsp; &nbsp; &nbsp;   ; $this->Array = $arr;

 &nbsp; &nbsp;  }

 

...

 

It's different of java ;)

 

--

Wilkin

 


class CArray {
 &nbsp;   ; var $Array;

&nbsp; &nbsp; &nbsp; function CArray($arr) {
 &nbsp;   ; &nbsp; &nbsp; $this->Array = $arr;
 &nbsp;   ; }
 &nbsp;   ; &nbsp;  function Extract()&nbsp; {
 &nbsp;   ; &nbsp; &nbsp; extract(array_change_key_case($this->;Array, CASE_LOWER), EXTR_PREFIX_SAME, &quot;");
 &nbsp;   ; }
}

$arr = new Array($array);
$arr-&gt;Extract();

Nothing happend... not even an error.
What is wrong in this class?






--
"Omnia si perdas, famam servare memento&quot;




--
Sem mais para o momento,
Rodrigo Souza

--------------------------------------------------------------------------------
:: Rodrigo Souza dos Santos
:: Curitiba - Paraná - Brasil
:: rodrigosouzadossantosgmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rodrigosouzadossantosgmail.com
--------------------------------------------------------------------------------



--
Sem mais para o momento,
Rodrigo Souza

--------------------------------------------------------------------------------
:: Rodrigo Souza dos Santos
:: Curitiba - Paraná - Brasil
:: rodrigosouzadossantosgmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rodrigosouzadossantosgmail.com
--------------------------------------------------------------------------------




--
"Omnia si perdas, famam servare memento&quot;
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Re: Class Construction in PHP
country flaguser name
United States
2007-05-25 04:23:51
Hi,

your code should work, but what are you tryin to do?

The content of class property $this->Array will be
extracted inside
the function Extract(). Therefore the new variables $test
and $abc
only available inside the function Extract(). You can test
this by
using get_defined_vars(). Example:
[snip]
$array = array("Test" => 123, "Abc" 
=> 456);

class CArray {
      var $Array;

      function CArray($arr) {
          $this->Array = $arr;
      }

      function Extract()  {
          extract(array_change_key_case($this->Array,
CASE_LOWER),
EXTR_PREFIX_SAME, "");
          $vars = get_defined_vars();
          var_dump($vars);
      }
}

$arr = new CArray($array);
$arr->Extract();
[/snap]

__construct() vs. CArray():
You should use __construct() as constructor instead of
CArray(). Both
will work but __construct ist the better way. The PHP parser
(>= 5)
will look at first for an __construct() definition, after
then it
looks for an function having same name as the class.


purcaholic


On 24 Mai, 15:29, "Ralph Rassweiler"
<ralphr...gmail.com> wrote:
> Hello,
>
> I use the following commands to work with arrays:
> $array = array("Test" => 123,
>                      "Abc"  => 456);
> //Extract array values into vars with the same name of
the keys in lower
> case
> extract(array_change_key_case($array, CASE_LOWER),
EXTR_PREFIX_SAME, "");
>
> However, i'd like to do this using a OO Class (I'm a
begginer in OO).
>
> So, i do this:
>
> class CArray {
>       var $Array;
>
>       function CArray($arr) {
>           $this->Array = $arr;
>       }
>          function Extract()  {
>          
extract(array_change_key_case($this->Array, CASE_LOWER),
> EXTR_PREFIX_SAME, "");
>       }
>
> }
>
> $arr = new Array($array);
> $arr->Extract();
>
> Nothing happend... not even an error. What is wrong in
this class?
>
> --
> "Omnia si perdas, famam servare memento"


--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---


Re: Class Construction in PHP
country flaguser name
United States
2007-06-05 03:11:58
$arr = new CArray ($array);
extract ($arr->getVars ());

instead of Extract():
function getVars ()
{
    return $this->Array;
}

--
free web developer tools:
  http://osbtools.goog
lepages.com/


On May 25, 11:23 am, purcaholic <purcaho...googlemail.com> wrote:
> Hi,
>
> your code should work, but what are you tryin to do?
>
> The content of class property $this->Array will be
extracted inside
> the function Extract(). Therefore the new variables
$test and $abc
> only available inside the function Extract(). You can
test this by
> using get_defined_vars(). Example:
> [snip]
> $array = array("Test" => 123,
"Abc"  => 456);
>
> class CArray {
>       var $Array;
>
>       function CArray($arr) {
>           $this->Array = $arr;
>       }
>
>       function Extract()  {
>          
extract(array_change_key_case($this->Array, CASE_LOWER),
> EXTR_PREFIX_SAME, "");
>           $vars = get_defined_vars();
>           var_dump($vars);
>       }
>
> }
>
> $arr = new CArray($array);
> $arr->Extract();
> [/snap]
>
> __construct() vs. CArray():
> You should use __construct() as constructor instead of
CArray(). Both
> will work but __construct ist the better way. The PHP
parser (>= 5)
> will look at first for an __construct() definition,
after then it
> looks for an function having same name as the class.
>
> purcaholic
>
> On 24 Mai, 15:29, "Ralph Rassweiler"
<ralphr...gmail.com> wrote:
>
> > Hello,
>
> > I use the following commands to work with arrays:
> > $array = array("Test" => 123,
> >                      "Abc"  => 456);
> > //Extract array values into vars with the same
name of the keys in lower
> > case
> > extract(array_change_key_case($array, CASE_LOWER),
EXTR_PREFIX_SAME, "");
>
> > However, i'd like to do this using a OO Class (I'm
a begginer in OO).
>
> > So, i do this:
>
> > class CArray {
> >       var $Array;
>
> >       function CArray($arr) {
> >           $this->Array = $arr;
> >       }
> >          function Extract()  {
> >          
extract(array_change_key_case($this->Array, CASE_LOWER),
> > EXTR_PREFIX_SAME, "");
> >       }
>
> > }
>
> > $arr = new Array($array);
> > $arr->Extract();
>
> > Nothing happend... not even an error. What is
wrong in this class?
>
> > --
> > "Omnia si perdas, famam servare
memento"


--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---


[1-9]

about | contact  Other archives ( Real Estate discussion Medical topics )