Re: [PHP] is there anyway to use constants in a string?

2004-07-20 Thread Justin Patrin
On Tue, 20 Jul 2004 00:31:19 -0400, Jason Barnett [EMAIL PROTECTED] wrote: I was working on something else tonight when I literally stumbled across another solution that works here... pick your poison: ?php $heredoc = XML ?xml version=1.0 encoding=iso-8859-1 ? root node attribute=I am

Re: [PHP] is there anyway to use constants in a string?

2004-07-19 Thread Justin Patrin
On Mon, 19 Jul 2004 10:22:42 -0700, barophobia [EMAIL PROTECTED] wrote: hello. ?php define(MY_CONSTANT, http://google.com/;); $my_string = QQQ MY_CONSTANT: does not work for obvious reasons {MY_CONSTANT}: does not work for obvious reasons {$MY_CONSTANT}: does not work for obvious

Re: [PHP] is there anyway to use constants in a string?

2004-07-19 Thread barophobia
On Mon, 19 Jul 2004 11:48:02 -0700, Justin Patrin [EMAIL PROTECTED] wrote: On Mon, 19 Jul 2004 10:22:42 -0700, barophobia [EMAIL PROTECTED] wrote: $my_string = QQQ MY_CONSTANT: does not work for obvious reasons {MY_CONSTANT}: does not work for obvious reasons {$MY_CONSTANT}: does not

Re: [PHP] is there anyway to use constants in a string?

2004-07-19 Thread Justin Patrin
Yes, I know. You can't use defined constants within a normal string, so it won't work in a heredoc either: define('FOO', 'bar'); echo show me FOO; You have to use: echo 'show me '.FOO; On Mon, 19 Jul 2004 12:05:40 -0700, barophobia [EMAIL PROTECTED] wrote: On Mon, 19 Jul 2004 11:48:02 -0700,

Re: [PHP] is there anyway to use constants in a string?

2004-07-19 Thread Jason Barnett
I was working on something else tonight when I literally stumbled across another solution that works here... pick your poison: ?php $heredoc = XML ?xml version=1.0 encoding=iso-8859-1 ? root node attribute=I am an attribute textI am a text node./text /node dynamic