Posted by laredotornado on 11/04/05 21:53
I actually want the result string (what is printed to the browser) to
look like
param1=abcd&agency_id=<?php echo $LTON; ?>¶m2=dex
This PHP code:
<?php
$str = "&mine=20&agency_id=234&test=abc";
$search = "/agency_id=\\d+/i";
$replace = "agency_id=<?php echo \$LTON; ?>";
$retVal = preg_replace($search, $replace, $str);
print $retVal;
?>
regrettably produces the wrong result
&mine=20&agency_id=&test=abc
How can I heal the pain? Thanks, - Dave
Navigation:
[Reply to this message]
|