mr.noname
-
Posts
11 -
Joined
-
Last visited
Posts posted by mr.noname
-
-
Thank so much chrsm and rythemton
is it not have the default value because php has a loosely typed language
-
in my opinion
the NULL is not assign anything to the variable
and
most of default value are EMPTY value
so if check it by empty() it return TRUE
but if check by is_null() it should be return FALSE
$a = NULL; // i think $a will not keep anything $b; // it assign to the default value --> i think it must be the empty value
-
you can use the default value
for example
$message = "you default value"; include("some_process_file_that_change_behavior_of_message_var.php"); //follow you code check here
hope it help
-
sorry requinix for the my mistake
and
thank you for you suggestion
for the next post i will carefully review
-
please reforrmatting your code
normaly
mysql_fetch_array() is try to get the result from the given resource
so
if there are empty result, it will thrown out some warning
-
in the code example
the $recipients and $bcc argument MUST BE an array
so if the $recipients and $bcc is not an array
you will get some warning message
well, if this is the codeigniter ( i think it is codeigniter )
the insert line is corrected
*** make sure ***
in your code example
the recipient will always replace by bcc id before save if you pass $bcc into a function
-
i think ( i'm not sure )
you sql is specify all row that mpid contain 6
so
the if expression must be alway true except if you get the empty result
-
sorry for this is the example
[td]empty()
0
TRUE
TRUE
FALSE
0.0
TRUE
TRUE
FALSE
"0"
TRUE
TRUE
FALSE
""
TRUE
TRUE
FALSE
" "
FALSE
TRUE
FALSE
NULL
TRUE
FALSE
TRUE
FALSE
TRUE
TRUE
FALSE
array()
TRUE
TRUE
FALSE
-
let's check this for example
if the variable assign to this value
0 ----> number 0 "0" ----> string 0 "" ----> empty string " " ----> string with whitespace 0.0 ----> double value array() ----> empty array NULL ----> null value FALSE -----> boolean false
if use
empty() ----> will return TRUE
is_null() ---> return TRUE on NULL value
isset() ---> all above are TRUE except FALSE and NULL value
-
use this
if( empty($str['comment']['email']) ) { // do something if empty value } else { // if not empty }
Uploading Images - Single and/or Multiple
in PHP Coding Help
Posted
you can check empty value for any image field before insert to your database
and this is the best practice