I'm trying to modify an existing html which is output using echo.
<form action="/" id="searchForm" method="post">
I want to replace the "/" with $targetHost.
I can't seem to get the syntax correct.
Any help is much appreciated.
<form action="<?= $targetHost ?>" id="searchForm" method="post">
<?= $targetHost ?> is a shorthand for <?php echo $targetHost ?>
<?php $targetHost="/mobile/index.php"; $matrix = '<form action=' . $targetHost . ' id="searchForm" method="POST"><p>Hello World</p></form><br/>'; echo $matrix; ?>