RE: [PHP] ->
| From: | Cal Evans | Date: | Wed, 24 Jan 2001 19:36:58 +0000 |
| Subject: | RE: [PHP] -> | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-36460@lists.php.net to get a copy of this message | ||
$generic is an object. Somewhere you've got a line in your code that
instantiates it. (i.e. $generic = new ...)
Cal
http://www.calevans.com
-----Original Message-----
From: Karl J. Stubsjoen [mailto:karlflips@kstub.com]
Sent: Wednesday, January 24, 2001 1:18 PM
To: Cal Evans; PHP Mailing List
Subject: Re: [PHP] ->
Aisch! Hmmm... yep, clear as mud. Let me describe what I we have going on:
We have a function called ToForm which looks like it verifies values coming
in from a POST. This function is invoked like this:
$generic->ToForm("cart_id", NO_DEFAULT_VALUE);
$generic->ToForm("email_address", NO_DEFAULT_VALUE);
I don't understand the $generic-> and what happens when it "becomes"
something twice. The ToForm function looks like this:
function ToFORM($val, $default, $makeuppercase=0) {
global $FORM, $$val;
if(!empty(${$val}))
$FORM[$val] = trim(${$val});
else if($default != NO_DEFAULT_VALUE)
$FORM[$val] = $default;
if($makeuppercase)
$FORM[$val] = strtoupper($FORM[$val]);
}
Thanks for the help!
Karl
----- Original Message -----
From: "Cal Evans" <cal@calevans.com>
To: "Karl J. Stubsjoen" <karlflips@kstub.com>; "PHP Mailing List"
<php-general@lists.php.net>
Sent: Wednesday, January 24, 2001 12:08 PM
Subject: RE: [PHP] ->
> It's means that what's on the right is part of the object on the left.
>
> i.e.
>
> $myObject->myMethod();
>
> fires the method myMethod() of the object $myObject.
>
> echo $myObject->myAttribute;
>
> displays the value of the attribute myAttribute of the object $myObject.
>
> Clear as mud? ;)
>
> Cal
> http://www.calevans.com
>
>
> -----Original Message-----
> From: Karl J. Stubsjoen [mailto:karlflips@kstub.com]
> Sent: Wednesday, January 24, 2001 1:05 PM
> To: PHP Mailing List
> Subject: [PHP] ->
>
>
> What does -> do?
> As in:
> $Something->then_something_over_here
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net