範例:
$fruits = array('apple', 'banana', 'cranberry');
echo end($fruits); // cranberry
應用:取得檔案副檔名
$filename = function.end.php
$tmp = explode(".", $filename);
$filesub = end($tmp) // php
參考資料來源:
http://php.net/manual/en/function.end.php
$fruits = array('apple', 'banana', 'cranberry');
echo end($fruits); // cranberry
應用:取得檔案副檔名
$filename = function.end.php
$tmp = explode(".", $filename);
$filesub = end($tmp) // php
參考資料來源:
http://php.net/manual/en/function.end.php
留言