Different and inconsistent behaviour depending on whether in a HTML or in a PHP environment

Created on 17 March 2013, over 11 years ago
Updated 14 December 2023, 7 months ago

I have noticed that sometimes the results from the Amazon filter lead to unpredictable results. For instance, in the code below I am looking for the author name and for the editorial review, both in HTML and in PHP. In HTML, the results are OK in both cases. When I try to get the same results in PHP, however, only the first one is OK, even though we're using the same data in all four cases. I think this is a bug - or if I'm doing something wrong, please indicate how to get the data in the fourth case too.

In a plain HTML environment, this works:<br>

[amazon 0195157990 author]

<br>And this works too:<br>

[amazon 0195157990 editorialreview]
<br>

<?php
echo "<br>In a PHP environment, this works: <br>";
$authorname = "[amazon 0195157990 author]";
echo "<br>This works: <br>" . $authorname;

// The code below leads to an error. 
//$somereview = "[amazon 0195157990 editorialreview]";
//echo $somereview;

//Parse error: syntax error, unexpected T_STRING in E:\xampp\htdocs\dru721\modules\php\php.module(80) : eval()'d code on line 12
?>
πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium modul

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024