我有一個textarea字段。輸出將是一個HTML列表。每一行將是一個新的列表項。如果用戶輸入一個hypen(' - '),則列表項將被嵌套將用戶輸入轉換爲PHP中的列表數組
Sample
test1
te-st2
-test3
-test4
--test5
--test6
-test7
test8
-test9
test10
Output should be
Array (test1,
te-st2,
array(test3,
test4,
array(test5, test6),
test7
),
test8,
array(test9),
test10
我不擔心關鍵值。 我再從http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_item_list 運行theme_item_list
創建列表
將這份名單隻列出3或者是N + – Prisoner 2011-03-23 16:57:29
@Prisoner它的N – iStryker 2011-03-23 17:15:58