Results 1 to 4 of 4

Thread: PHP - IIF function

  1. #1
    Join Date
    Aug 2009
    Posts
    36

    PHP - IIF function

    I am looking for information on PHP - IIF function. Does any how to declare PHP - IIF function and what are uses of this IIF function. Any recommendations and suggestions are appreciated.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: PHP - IIF function

    IIF stands for Immediate IF, this is a well-known function in most languages but unfortunately PHP does not contain such a function.iif() is handy for true and false returns. However if you use it to test and then pass data, if the data chunk is large, it may be much more inefficent then a plain old if/else. PHPkit provide the functon as follows,Syntax :- IIF(condition , true statment , false statment ).

  3. #3
    Join Date
    Dec 2008
    Posts
    177

    Re: PHP - IIF function

    In Access, the iif function returns one value if a specified condition evaluates to TRUE, or another value if it evaluates to FALSE.
    In computing, IIf is a function in several editions of the Visual Basic programming language, It is an example of a conditional expression, which is similar to a conditional statement.You can use IIf anywhere you can use expressions. You use IIf to determine if another expression is true or false. IIf always evaluates both truepart and falsepart, even though it returns only one of them.

  4. #4
    Join Date
    Jan 2009
    Posts
    199

    Re: PHP - IIF function

    iif function in php :
    Code:
    <?php
    	function test ($test1) {
    		return $test1 ? 'true' : 'false' ;
    	}
    	echo test1(1);
    	echo '<br>';
    	echo test1(0);
    ?>

Similar Threads

  1. c++ equivalent function to the c-function 'sprintf
    By Dilbert in forum Software Development
    Replies: 6
    Last Post: 13-12-2011, 04:03 PM
  2. c# function equivalent to gettime function in javascript
    By Omaar in forum Software Development
    Replies: 4
    Last Post: 10-03-2010, 10:44 PM
  3. Replies: 5
    Last Post: 27-02-2010, 07:52 PM
  4. How does abstract function differs from virtual function?
    By Maddox G in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 11:32 AM
  5. Function keys don't function under windows XP
    By GunFighter in forum Hardware Peripherals
    Replies: 3
    Last Post: 08-04-2009, 11:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,967,117.16992 seconds with 17 queries