Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 24-11-2009
Member
 
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.
Reply With Quote
  #2  
Old 24-11-2009
Member
 
Join Date: May 2008
Posts: 2,293
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 ).
Reply With Quote
  #3  
Old 24-11-2009
Member
 
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.
Reply With Quote
  #4  
Old 24-11-2009
Member
 
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);
?>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "PHP - IIF function"
Thread Thread Starter Forum Replies Last Post
c++ equivalent function to the c-function 'sprintf Dilbert Software Development 6 13-12-2011 04:03 PM
c# function equivalent to gettime function in javascript Omaar Software Development 4 10-03-2010 10:44 PM
How to pass function with parameters to another function in PHP? Linoo Software Development 5 27-02-2010 07:52 PM
How does abstract function differs from virtual function? Maddox G Software Development 5 29-01-2010 11:32 AM
Function keys don't function under windows XP GunFighter Hardware Peripherals 3 08-04-2009 11:07 PM


All times are GMT +5.5. The time now is 07:06 AM.