A
Anonymous
Guest
How can I search for a number in a string and replace it with another value?
I.E
string: This is a string with the number 133
and I want to replace it with the number * 700.
Ive got this code:
And if you could explain what the code do ( if you past any ) I would be grateful.
I.E
string: This is a string with the number 133
and I want to replace it with the number * 700.
Ive got this code:
Code:
<?php
$slots = explode("\r\n", trim($_POST['slots']));
foreach ($slots as $n=>$slot)
{
//here will the replace code be
}
?>
And if you could explain what the code do ( if you past any ) I would be grateful.