如何将数组值添加到数组的中间?
问题描述:
让我说我有这个数组:
$array = array(1,2,'b','c',5,6,7,8,9.10);
稍后在脚本中,我想在"c"之前添加值"d".我该怎么办?
Later in the script, I want to add the value 'd' before 'c'. How can I do this?
让我说我有这个数组:
$array = array(1,2,'b','c',5,6,7,8,9.10);
稍后在脚本中,我想在"c"之前添加值"d".我该怎么办?
Later in the script, I want to add the value 'd' before 'c'. How can I do this?