Ver originalforeach(explode('[s=n]', $resultado['contenido']) as $n => $value) { if ($value != '') echo $n++ . ". $value<br />";}