Date: 09/30/00
- Next message: Bilgehan Yıldırı: "[PHP] Ynt: Very sorry but."
- Previous message: Chris Hayes: "RE: [PHP] Save as .............."
- In reply to: Matt McClanahan: "Re: [PHP] string concat with < and >"
- Next in thread: Jason Brooke: "Re: [PHP] accessing CONSTANTS"
- Reply: Jason Brooke: "Re: [PHP] accessing CONSTANTS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
thanx to those who helped me with the question on < and > characters! :)
another question i have is regarding accessing constants. eg,
define ("ADMIN", "admin <email protected>");
echo "send mail to <a href=\"mailto: ADMIN\">admin</a>"
PHP interperts ADMIN as a string... is there anyway to access the value
of a constant?
$ad = ADMIN doesn't do the trick either... it again evaluates ADMIN to be
the string "ADMIN"...
thanx in advance!
----------------
remco chang
bountyquest.com
On Sat, 30 Sep 2000, Matt McClanahan wrote:
> On Sat, 30 Sep 2000, Remco Chang wrote:
>
> > i'm having trouble concatenating strings with the characters '<' and '>'.
> >
> > $msg = "hello";
> > $msg = "<".$msg.">";
> >
> > this doesn't work at all... i would like $msg to be <hello>, but i end up
> > getting an empty string.
> >
> > neither does "<<".$msg.">>" or "\<".$msg."\>" work...
> >
> > i'm stumped, any ideas?
>
> Works fine. But if you echo that to a browser, it'll parse <hello> as a
> tag and display nothing. (Hint: Viewing the html source when debugging is
> almost always useful)
>
> If you want to display '<hello>' in a browser, you'd need to use < and
> > instead of < and >.
>
> $msg = 'hello';
> $msg = "<$msg>";
>
> Matt
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Bilgehan Yıldırı: "[PHP] Ynt: Very sorry but."
- Previous message: Chris Hayes: "RE: [PHP] Save as .............."
- In reply to: Matt McClanahan: "Re: [PHP] string concat with < and >"
- Next in thread: Jason Brooke: "Re: [PHP] accessing CONSTANTS"
- Reply: Jason Brooke: "Re: [PHP] accessing CONSTANTS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

