Let's say I have an array that looks like this:
$args = array(
'format' => 'file',
'type' => 'page',
'name' => 'Projects',
'template' => 'default'
);
To get the values from the array keys I need to do this:
echo $args['format'];
echo $args['type'];
echo $args['name'];
echo $args['template'];
While it works, it feels more messy than needed. Is there a proper way to somehow convert it to this?
echo $format;
echo $type;
echo $name;
echo $template;
I'm aware of list but that only uses values and not keys.