Jump to content


Photo

String heredoc and complex syntax


  • Please log in to reply
2 replies to this topic

#1 JustinK101

JustinK101
  • Members
  • PipPipPip
  • Advanced Member
  • 503 posts
  • LocationSan Diego, California, US

Posted 02 October 2006 - 11:05 PM

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.

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


#2 JustinK101

JustinK101
  • Members
  • PipPipPip
  • Advanced Member
  • 503 posts
  • LocationSan Diego, California, US

Posted 02 October 2006 - 11:16 PM

Sorry I wasnt clear, the problem is in my value="{$lang_clock} {ucfirst({$CURRENT_CLOCK})}" attribute.

#3 moxicon

moxicon
  • New Members
  • Pip
  • Newbie
  • 3 posts
  • LocationPortland, Oregon, USA

Posted 03 October 2006 - 04:14 AM

Functions don't work inside HEREDOCs. Also, the curly braces are unnecessary in your example.
Moxley
[br]www.moxleystratton.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users