<td $tbl><center><img src='/images/foto/".$data['foto']."'></center></td>
$a = $data['foto']; $b = str_replace('.jpg', '', $a); echo $a; //petriukas.jpg echo $b; //petriukas