in visual basic you can have
if NOT isnumeric("sss") then do this
how do you do this in php? it doesnt like the word NOT. this dont work
if(NOT is_numeric("sss")){ do this }
Moderators: macek, egami, gesf

$a = array(1 => 'one', 2 => 'two', 3 => 'three');
class foo
{
function do_foo()
{
echo "Doing foo.";
}
}
$bar = new foo;
echo "<pre>";
var_dump("hello",43,34.56,true,$a,$bar);//this is the key
echo "</pre>";string(5) "hello"
int(43)
float(34.56)
bool(true)
array(3) {
[1]=>
string(3) "one"
[2]=>
string(3) "two"
[3]=>
string(5) "three"
}
object(foo)(0) {
}

if ( !isset($my_var) ){
blah....
}if ( $my_var != $my_value ){
blah....
}

Return to PHP coding => General
Users browsing this forum: No registered users and 2 guests