hey
i want a function do that,
select the action / name to be output : 2 => Weapon Mastery
[php]
( skill
( name "Weapon Mastery")
( action 2)
( image "passive001")
)
( skill
( name "Lightning Slash")
( action 3)
( image "active003")
)
[/php]
i tried that
[php]
function extract($string){
preg_match_all("/action [0-9]+/i", $string, $matches);
return $matches[0];
}
$outs = extract($text);
$ago = (implode($outs,",
"));
print(preg_replace(’/action/’,’’,$ago));
[/php]
it successed and output is :
2
3
but i didnt find the way to select the action / name in same time
to be outputs : 2 => Weapon Mastery