My previous code was a rand, which has nothing to do with my current intent, which is to replace whenever I find a value, by the other value of the array.
$myWords=array(
array('funny','sad'),
array('fast','slow'),
array('beautiful','ugly'),
array('left','right'),
array('5','five'),
array('strong','weak')
);
$mycontentmixed = rewrite3($myVar, $myWords);
$myVar = 'This girl is very funny and fast and kick to left';
When the system finds the value of any key contained in the array, always switch to it for another value, I have these system ready, but it does a rand that sometimes falls on the same key found, and in 50% of cases it does not Value, I would always like to change.
I want to change to:
output: 'This girl is very sad and slow and kick to right';
Or if you find another key:
$myVar = 'This girl is very sad and slow and kick to right';
Switch to:
Output: 'This girl is very funny and fast and kick to left';
When one of the keys is found in the $myVar variable always make the exchange for the other key.
Thanks.