I’ve got to be overlooking something ever so simple. I’m trying to print a message from a function, and I can’t get it to print. Where did I go wrong?
[php]<?php
function greeting() {
$msg=“The message goes here.”;
print $msg;
}
?>[/php]
I’ve taken the double quotes and substituted single quotes. I put the print line outside of the function line,
[php]<?php
function greeting() {
$msg=“The message goes here.”;
}
print $msg;
?>[/php]
I make a call to the function
[php]
<?php greeting(); ?>[/php]Somewhere along the line, I just don’t know what I am doing wrong.