assign value php
snippet in php

assign value php

user6054

reset($val['MemberSaveRoom'])['is_favour_room'] = true; // INCORRECT
$val['MemberSaveRoom'][0]['is_favour_room'] = true; 	// CORRECT

// result 
MemberSaveRoom = array(
  [0] = array(
    'is_favour_room' => true,
  ));