-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
paladin.rithe@gmail.com wrote:
[color=blue]
> Is it possible to store classes in an array? I am fairly new to PHP,
> and haven't found anything either way yet.[/color]
Classes? No. Objects? Definively yes.
[color=blue]
> "Cannot use a scalar value as an array", and "Call to a member function
> on a non-object". The second is related to the first, as I'm calling a
> function on the array value.[/color]
My guess is that you are doing something like:
<?php
$object = new foo;
$array[$object] = $counter;
?>
When you should be doing:
<?php
$object = new foo;
$array[$counter] = $object;
?>
- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net
http://acm.asoc.fi.upm.es/~mr/ ;
http://acm.asoc.fi.upm.es/~ivan/
MSN:i_eat_s_p_a_m_for_breakfast@hotmail.com
Jabber:ivansanchez@jabber.org ;
ivansanchez@kdetalk.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD1pX33jcQ2mg3Pc8RAmsNAJwKqNtfSPj0kZ6T0eBFuc daywxohQCfQ/Wk
SAaNzt8xfdIQCzOlG6zK4LA=
=kW+r
-----END PGP SIGNATURE-----