I have been trying to take out some value from a string in php but not getting success so if you people can please take a look at my code as :
$html = "[ect]afdbec[ect]";
$output =true;
$x=1;
while ($output == true) {
$pos = strpos($html,"[");
$value = substr($html,$pos,$x);
echo $value;
$x++;
if ($value == "]") { $output = false; }
}