Jump to content

Getting rid of a random combination of numbers


dude87121

Recommended Posts

How come the numbrs in $the cannot be replaced? They still show up in the same file. I am trying to get rid of a random combination of numbers using str_replace. Any help will be appreciated. Thanks.

<?php
$the='<?php hery 1 2 ?>';
$num = array("1", "2", "3", "0");
$dude = str_replace('hery'. $num. ' ?>', "", $the);
$thecontent=fopen('testresults.php', 'w');
fwrite($thecontent,$dude);
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.