Hello,
This a simple sample about how to add image captions:
$options = array(
'src' => 'image.png',
'imageAlign' => 'left',
'scaling' => 50,
'spacingTop' => 10,
'spacingBottom' => 0,
'spacingLeft' => 0,
'spacingRight' => 20,
'textWrap' => 0,
'borderStyle' => 'lgDash',
'borderWidth' => 6,
'borderColor' => 'FF0000',
'caption' => array('show_label' => true, 'text' => 'FIRST IMAGE')
);
$docx->addImage($options);
You may read the valid parameters on the addImage API doc (http://www.phpdocx.com/api-documentation/word-content/insert-image-Word-document-with-PHP).
Regards.