PHP Replace chars by functions
- by user1860570
I try change characters by functions
<?php
$string = "Hi everybody people [gal~images/articles~100~100~4] here other imagen [gal~images/products~100~100~3]";
$regex = "/\[(.*?)\]/";
preg_match_all($regex, $string, $matches);
for($i=0; $i<count($matches[1]);$i++)
{
$match = $matches[1][$i];
$array = explode('~', $match);
…