.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Programming (http://forums.bots-united.com/forumdisplay.php?f=25)
-   -   PHP Question (http://forums.bots-united.com/showthread.php?t=6591)

Ancient 21-12-2007 23:19

PHP Question
 
I've seen this in the NSS Forum.
Code:

$sticky = ($_POST['sticky'])?1:0;
What is that?
Code:

()?1:0;

Is that like?
Code:

1 || 0

Also, do you know where I can download a PHP book?

Whistler 22-12-2007 05:42

Re: PHP Question
 
"a ? b : c" means "if a is true then the value is b, otherwise the value is c".

for a PHP book, search for "bruce perens open source series" in Google and I'm sure you can find a pretty good one.

Ancient 23-12-2007 05:31

Re: PHP Question
 
Thanks.
I guess in lamens terms it's a mini if/else.
I got O`rileys book.
TY for the help.


All times are GMT +2. The time now is 11:23.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.