/ / get last directory in $PATH $dir = substr( strrchr($PATH, ":"), 1); / / get everything after last newline $text = "Line 1\nLine 2\nLine 3"; $last = substr(strrchr($text, 10), 1);
?php / / Lit le dernier dossier dans le chemin $PATH $dir = substr( strrchr($PATH, ":"), 1); / / Lit tout, apr egrave;s la derni egrave;re nouvelle ligne $text = "Ligne 1\nLigne 2\nLigne 3"; $last = substr(strrchr($text, 10), 1);?