Date: 08/31/01
- Next message: Philip Olson: "Re: [PHP] help again"
- Previous message: Jason Bell: "Re: [PHP] help again"
- In reply to: Nikola Veber: "[PHP] help again"
- Next in thread: Philip Olson: "Re: [PHP] help again"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
echo sends a literal string to the output and eventually evaluates variables
that are found inside, so it seems that your instruction should be:
echo "<h1>{$beer}'s taste is great</h1>";
Why it worked with <h1> outside, I guess because it was closing some former
tag in your code or something like that...
Hope this helps (this sentence should be a tag!)
Regards,
Alex.
----- Original Message -----
From: "Nikola Veber" <veber <email protected>>
To: "php forum" <php-general <email protected>>
Sent: Friday, August 31, 2001 12:38 PM
Subject: [PHP] help again
> I am having big troubles here. I wrote this code just as it said in the
manual, and
> it prints
> "{$beer}'s taste is great";?>
>
> <html>
> <head>
> <title>PHP Test</title>
> </head>
> <body>
> <?php
> $beer = 'Heineken';
> echo <h1>"{$beer}'s taste is great"</h1>;
> ?>
> </body>
> </html>
>
> and if I don't put string into <h1> it prints nothing !
>
> I'm kind of confused right now ...
>
> (win98, opera 5.12, php installed with installShield)
>
>
> --
> 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: Philip Olson: "Re: [PHP] help again"
- Previous message: Jason Bell: "Re: [PHP] help again"
- In reply to: Nikola Veber: "[PHP] help again"
- Next in thread: Philip Olson: "Re: [PHP] help again"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

