La sintassi...
ho provato a scrivere:
ma non va, stampa la variabile non modificata e Notice: Undefined offset: 1 in xxxx.php on line 8Codice PHP:
<?php
$actions = "[A]{Action}";
preg_match_all("^\[.+?\]\{.+?\}^", $actions, $matches);
for ($i=0; $i< count($matches[0]); $i++) {
echo $matches[0][$i]."
\n";
echo $matches[1][$i] . "
\n";
}
?>