attr($name, $value = null)

Creates attributes for an html tag

Example

<img<?php echo attr(array(
  'src'    => 'http://yourdomain.com/someimage.jpg',
  'width'  => 300,
  'height' => 200,
  'alt'    => 'Nice image'
)) ?>>