Friday, October 29, 2010
Tuesday, October 26, 2010
Friday, July 30, 2010
PHP CLASSES AND IF/ELSE BLOCK
//*********************************working
$flag='3';
if($flag=='3')
{
class cc {
function __construct() {
echo 'cc!';
}
}
}
$type = 'cc';
$obj = new $type;
//****************************************not working
$type = 'cc';
$obj = new $type;
$flag='3';
if($flag=='3')
{
class cc {
function __construct() {
echo 'cc!';
}
}
}
?>
$flag='3';
if($flag=='3')
{
class cc {
function __construct() {
echo 'cc!';
}
}
}
$type = 'cc';
$obj = new $type;
//****************************************not working
$type = 'cc';
$obj = new $type;
$flag='3';
if($flag=='3')
{
class cc {
function __construct() {
echo 'cc!';
}
}
}
?>
Tuesday, July 27, 2010
postgresql-ARRAY
expression operator ANY (array expression) expression operator SOME (array expression)
The right-hand side is a parenthesized expression, which must yield an array value. The left-hand expression is evaluated and compared to each element of the array using the given operator, which must yield a Boolean result. The result ofANYis “true” if any true result is obtained. The result is “false” if no true result is found (including the special case where the array has zero elements).If the array expression yields a null array, the result ofANYwill be null. If the left-hand expression yields null, the result ofANYis ordinarily null (though a non-strict comparison operator could possibly yield a different result). Also, if the right-hand array contains any null elements and no true comparison result is obtained, the result ofANYwill be null, not false (again, assuming a strict comparison operator). This is in accordance with SQL's normal rules for Boolean combinations of null values.
SOMEis a synonym forANY.
Saturday, July 24, 2010
PHP Scripting in Command line
1. How can I execute a PHP script using command line?
Ans : “php filename” or “php -f filename” will run a php file in command line.
Ans : “php filename” or “php -f filename” will run a php file in command line.
Subscribe to:
Posts (Atom)