I have this string :
$content = 'Hello <!--blapi[getinfoprix("prix_p1"=>"1-6048df6;image/purchase-small.png"]--> Hello<!--blapi[prix_p1->description]-->';
How can i get the two string <!--*--> in an array[2]?
I've made this :
$pattern = '/<!--blapi\[(.*)\]-->/sU';
preg_match($pattern, $content, $matches);
But I have this result :
array(2) {
[0]=>
string(74) "<!--blapi[getinfoprix("prix_p1"=>"1-6048df6;image/purchase-small.png")]-->"
[1]=>
string(60) "getinfoprix("prix_p1"=>"1-6048df6;image/purchase-small.png")"
}
I don't understand why it's ignoring the second string <!--blapi[prix_p1->description]-->...
I've used the flag "U". Maybe there is a better pattern for what I want to do?
EDITION : I expect this result :
Array
(
[0] => getinfoprix("prix_p1"=>"1-6048df6;image/purchase-small.png"]
[1] => prix_p1->description
)