Answers

Question and Answer:

  Home  Jnr PHP/Codeigniter Developer

⟩ Explain me how would you declare a function that receives one parameter name hello?

If hello is true, then the function must print hello, but if the function doesn’t receive hello or hello is false the function must print bye.

<?php

function showMessage($hello=false){

echo ($hello)?'hello':'bye';

}

?>

 153 views

More Questions for you: