function check_for_null ( $var ) {
if ( ! $var ) {
return "Not NULL, we're OK.";
else {
return "We're horked to the bone.";
}
}
|
|
# fruitlist é um array de arrays.
function print_fruit ( $fruitlist ) {
foreach ( $fruitlist as $f ) {
$ret[] = "Fruit: $f[0], price: $ $f[1]";
}
return $ret;
}
|
|