Back to Phpword

Link

docs/usage/elements/link.md

1.4.0415 B
Original Source

Link

You can add Hyperlinks to the document by using the function addLink:

php
<?php

$section->addLink($linkSrc, [$linkName], [$fontStyle], [$paragraphStyle]);
  • $linkSrc. The URL of the link.
  • $linkName. Placeholder of the URL that appears in the document.
  • $fontStyle. See Styles > Font.
  • $paragraphStyle. See Styles > Paragraph.