- end: documentation ( source)
- explode: documentation ( source)
<?php
$path ="public://";
$string = "./documenti/cazzo/immagine.jpg";
$str = end(explode('/', $string));
$row = "lafiga";
if(isset($row) && $row != "") {
print($path.$str);
} else {
print("ciao");
}