an anyone help me?
I have this php code:
//$rezultat is an array of strings
$r_exp = "(dest|removeborder|fitsize)([\x2C-\x7A]+)$";
for($i = 0; $i < count($rezultat); $i++)
{
$temp = $rezultat[$i];
trim($temp);
preg_match($r_exp,$temp,$match); //match command
print_r($match); //display the structure of a non-empty array $match
echo ($temp.'<br />'); //display the searched string
}
it should display NON-empty array $match and then the searched string
the problem is that it only displays the $match variable as non-empty only for the last match, even if all the strings in the $rezultat array should get a match
example of output:
dest(aaa)
fitsize(320,240,all)
Array ( [0] => removeborder(acacca) [1] => removeborder ) removeborder(acacca)
HELP! any ideas ???