3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=array(array('#0kg - 50kg','Questions?','1|2'), array('Yes','','3|4'), array('#51kg - 100kg','Questions?','5|6')); for ($i=0,$j=0;$i<count($array);$i++) { if (strpos($array[$i][0], '#') !== false) { echo preg_replace("/#/",'',$array[$i][0]); $j++; } }

preferences:
36.54 ms | 402 KiB | 5 Q