Jump to content

Archived

This topic is now archived and is closed to further replies.

JustinK101

String heredoc and complex syntax

Recommended Posts

Trying to use the string complex syntax but its annoying me and not working.  I am trying to call a function call, here is my code. Thanks for the help.

[code]
echo <<<ENDTEXT
<p>
<input type="submit" name="clock_in" value="{$lang_clock} {ucfirst({$CURRENT_CLOCK})}" class="clock" />
</p>
ENDTEXT;
[/code]

Share this post


Link to post
Share on other sites
Sorry I wasnt clear, the problem is in my value="{$lang_clock} {ucfirst({$CURRENT_CLOCK})}" attribute.

Share this post


Link to post
Share on other sites
Functions don't work inside HEREDOCs. Also, the curly braces are unnecessary in your example.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.