KeziaKristina
Programmer
I have a problem like this.
I have a file contain :
<HTML>
<BODY>
The amount of goods : <?php print $sesuatu; $a++; ?>
<img src='kitty.gif'>
<form action='<?php print $PHP_SELF?>'>
</BODY>
</HTML>
I want to get ALL of the string between <?php and ?>and I have tried this way:
Put all the contain of that file into a string, then i used regular expression below to find the match string.
if ($string =~ /(<\?php.*?\?>)/smg) {
$temp .= $&;}
print $temp;
But i get only the first <?php...?> , ex:
<?php print $sesuatu; $a++; ?>
How can i solve this problem?
thx
I have a file contain :
<HTML>
<BODY>
The amount of goods : <?php print $sesuatu; $a++; ?>
<img src='kitty.gif'>
<form action='<?php print $PHP_SELF?>'>
</BODY>
</HTML>
I want to get ALL of the string between <?php and ?>and I have tried this way:
Put all the contain of that file into a string, then i used regular expression below to find the match string.
if ($string =~ /(<\?php.*?\?>)/smg) {
$temp .= $&;}
print $temp;
But i get only the first <?php...?> , ex:
<?php print $sesuatu; $a++; ?>
How can i solve this problem?
thx