Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

hot to use functions in heredoc

$fn = function ($data = NULL) {
    return $data;
};

$id = 5;
$name = 'Name';

echo <<<HTML
	{$fn(user($id, $name))}
HTML;
 
PREVIOUS NEXT
Tagged: #hot #functions #heredoc
ADD COMMENT
Topic
Name
9+1 =