-2

I cant get this syntax to work, already tried modifying it many time.

    <?php
echo 
"<a href='".include 'go/randomlink.php'."'>".$item['stockid']."</a>";
?>

1 Answers1

1

For this to work, your other php file must simply echo some string.

randomlink.php:

<?php
echo "What came first the chicken or the egg?";
?>

index.php:

echo "<a href='";
include('go/randomlink.php');
echo "'>" . $item['stockid'] . "</a>";

hope this helps you.

Jake Psimos
  • 640
  • 3
  • 10