Re: Is this a bug in PHP 4.3.4?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you. I will try that solution if it works, but the question still
remains...
Is PHP so buggy? The 'here document' should work without a problem in PHP
also.

My code works fine with PHP 5 (fortunately) under Windows, but it doesn't
work with PHP 4.3.4 under Linux.

I think I need to upgrade php under Linux also...

Teddy

----- Original Message ----- 
From: "Raditha Dissanayake" <jabber@xxxxxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Sent: Monday, November 29, 2004 5:29 PM
Subject: Re:  Is this a bug in PHP 4.3.4?


Octavian Rasnita wrote:

>Hi all,
>
>I use the  following program:
>
>
>

>function print_quotes () {
>output_reset_rewrite_vars();
>
>echo <<<EOF
><table>
>...
></table>
>EOF;
>}
>
>
>I have tried this program under Fedora Core 2 in command line mode and on
an
>Apache web server with the same results.
>
>Do you have suggestions for making this program work and why does this
>happen?
>
>
I think the problem is with your 'here document' this is the traditional
way of doing things in perl but in php you could  'go back into HTML. by
using the '?>' sequence. Thus your program might become

function print_quotes () {
output_reset_rewrite_vars();
 ?>
 <table>
 ...
 </table>
<?

}


There are pros and cons of both approach but the bit of code i have
given will produce the expected result.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux