Array (
[issuer_id] => in.gsvm
[org_id] => 00738648
[doc_type] => ABCDS
[RROLL] => 12589
[YEAR] => 2020
)
I want to remove org_id from array and store that data in another variable
You can use unset().
php > $array = Array (0 => 123, 1 => 456);
php > unset($array[0]);
php > print_r($array);
Array
(
[1] => 456
)
It destroys the variable, which in this case is the array item matching the index that you want to delete.
You assign the value to a new variable before removing it.
php > $array = Array (0 => 123, 1 => 456);
php > $v = $array[0];
php > unset($array[0]);
php > print_r($array);
Array
(
[1] => 456
)
php > echo $v;
123
You can use unset(array) method of PHP programming language to remove an item. for example
$dataArray = ['key1'=>'data1','key2'=>'data2'];
unset($dataArray['key1']);
Then pass the array to insert function.
$this->db->insert('table_name',$dataArray);
You can find details example on this link: https://www.techiedelight.com/remove-elements-array-php/