To a function and only return the URL if there is one. However I could have a array where $l['image_three']['url'] is not set and not in the array returned so I will always get undefined offset notices.

I can carry on the way I am but its getting repetive and would rather be able to do e.g.:

"image_one" => imageExists($l['image_one']['url'])

But of course I am already calling a key that doesn't exist (possibly). Is there an other methods of tidying up my shorthand if?