eval function, a string escape, extremely painful, please the hero to help
The following code, error-correct, can be correctly output an href when clicked can pop up 111
$TB = ";
$wcHead = ' $tb. =\ ';
$wcTable = ";
$wcFoot = ' \ '; ';
$t = ' 1111111fdddd ';
$wcTable = ' test ';//---------Note here
$WC = $wcHead. $wcTable. $wcFoot;
eval ($WC);
Echo $TB;
However, what I want to achieve is: a Click, then pops up $t= ' 1111111fdddd, the value of this variable, how to implement?? The following are the wrong methods:
$wcTable = 'Test';
$wcTable = 'Test';
------Solution--------------------
$wcTable =<<
<>
Test
html
------Solution--------------------
$TB = ";
$wcHead = ' $tb. =\ ';
$wcTable = ";
$wcFoot = ' \ '; ';
$t = ' 1111111fdddd ';
$wcTable = ' test ';//---------Note here
$WC = $wcHead. $wcTable. $wcFoot;
eval ($WC);
Echo $TB;
------Solution--------------------
Reference:
reference: PHP code?123$wctable=<<<>testhtml;
No, it's been resolved.
Test
Where not? Pop up 1111111fdddd isn't that what you want?