-3
我想做到這一點沒有expload的,array_pop和array_shift
$item[$fieldneedle] = " node_os_disk_danger ";
$objectName = preg_split('/_/',$item[$fieldneedle]);
$objectName == "os_disk";
在這個例子中我需要os_disk
我想做到這一點沒有expload的,array_pop和array_shift
$item[$fieldneedle] = " node_os_disk_danger ";
$objectName = preg_split('/_/',$item[$fieldneedle]);
$objectName == "os_disk";
在這個例子中我需要os_disk
/(?:^.*?_)(.*)(?:_.*$)/
..will只捕獲os_disk
部分
[陣列的未固化的最後一個項目](完全重複http://stackoverflow.com/questions/4668997/unset-last-item-of-數組) - 請不要重新發布問題。編輯或添加評論到您的原始問題。 (這個問題有答案可以解決你在這裏問的問題) – ircmaxell 2011-01-12 13:16:11