Embedded PHP in script for relative link to image


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <div id="multimedia_box2">
  2. <div id="image_box2">
  3. <script language="JavaScript">
  4. <!--
  5. var img_rnd = new Array ("<?php echo THESIS_CUSTOM_FOLDER; ?>/images/puff_pancake_sm.png");
  6. var i = Math.floor(1*Math.random());
  7. document.write('<img src="' + img_rnd[i] + '" width="416" />');
  8. //–>
  9. </script>
  10. </div>
  11. </div>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.