R: [PHP-GENERAL] syntax error?

From: Date: Wed, 21 Jun 2000 14:29:00 +0000
Subject: R: [PHP-GENERAL] syntax error?
Groups: php.general 
Request: Send a blank email to php-general+get-2495@lists.php.net to get a copy of this message
In C syntax would be: $a = (isset($b) ? &$c : &$d); Your "$a = (isset($b)) ? &$c : &$d;" means: assign $a value isset($b). All after "?" is considered trash Ciao Roberto -----Messaggio originale----- Da: Jonas Jochum [mailto:jj@commandline.de] Inviato: mercoledì 21 giugno 2000 16.23 A: Teodor Cimpoesu Cc: php-general@lists.php.net Oggetto: Re: [PHP-GENERAL] syntax error? Priorità: Alta -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 21.06.00 um 12:06 hat Teodor Cimpoesu geschrieben: TC>Hi Jonas! Hi Teodor! TC>> able to do this: "$a = (isset($b)) ? &$c : &$d;" TC>> the quotes don't help. Neither with nor without them does it work. :-/ TC>But you can either use a cleaner if() or yea, I know, but I wanted to get the conditional on one line, since I have quite a few of them. That's why I used short form. TC>(isset($b) ? $a = &$c : $a = &$d); I'll try that. Thanks! :) - -- Reg., Jonas Jochum commandline net services - ------------------------------------------------------------------------- tel: 07223-911794 | cmd:~ # Systemadministration, Netzwerkverwaltung fax: 07223-911795 | cmd:~ # Einrichtung von *BSD/Linux-Servern d2 : 0173-5712481 | cmd:~ # Datenbank/Internetprogrammierung jj@commandline.de | cmd:~ # Webdesign www.commandline.de | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.1 (FreeBSD) Comment: Made with pgp4pine iEYEARECAAYFAjlQz8AACgkQF1ki3orczCBP1ACfQMXcSDDzYE799GxUUL2sMYbf qcsAoIdyc/1NhQHFOUn7Ky8oUx/a4MUl =pVkR -----END PGP SIGNATURE----- -- 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

« previous php.general (#2495) next »