here's my php code:
$settings = array(
'width' => 500,
'height' => 300
);
$mygrid->init($settings);
class code:
class mygrid
{
function __construct($settings)
{
$default_settings = array(
'width' => 500,
'height' => 300
)
}
}
i'd like to kinda merge both arrays in order to have a fallback to default values, eg. when creating an instance which sets width only:
$settings = array('width' => 800);
$mygrid->init($settings);
the class should use the default height of 300
thanks