Lets come straight to my problem, these are my folders:
Smarty-3.1.13
Smarty-3.1.15
Smarty-3.1.16
Smarty-3.1.19
this is how i get the foldernames
$smarty_versions = glob("php/Smarty-*");
results:
Array
(
[0] => php/Smarty-3.1.13
[1] => php/Smarty-3.1.15
[2] => php/Smarty-3.1.16
[3] => php/Smarty-3.1.19
)
now im looking for... em... may a regexp for glob to only select the latest folder.
actually everything what i have inserted as the first parameter into golb
what looks like regexp failed :) is there a way so get the last folder like this?
or have i do it like...
$smarty_versions = glob("php/Smarty-*");
$latest_smarty_version = $smarty_versions[count($smarty_versions)-1];
//works but i like it more tiny if possible :)
maybe you guys know a other one line solution :D