首先加载现有选项并将新数据另存为数组中的元素:
// get the option
$data = get_option( \'row_name\' );
// add new data to the option
$data[] = $options;
// save it back to the db
update_option( \'row_name\', $data );
然后,您的选项将是数组的数组,而不仅仅是单个数组:
Array
(
[0] => Array
(
[py_name] => username
[address] => addy
[coords] => results
)
[1] => Array
(
[py_name] => username
[address] => addy
[coords] => results
)
)