I have a website I am making as a school project, and it appears I have jumped into something a bit too deep. I'm using PHP to create a page for each array object. In each page, I want to personalize the contents to match the page. For example, I have a page that gets created named Darryl
and it's going to contain all my images. Other pages will be created and the contents of those pages will be created dynamically depending on the page.
What I am trying to do, is to change the img src
using PHP and use a counter to make different images pop up. This is incredibly hard for me to explain.
I have this line of html code which contains the php(Which determines which images get shown:
<td><img style="width:11em;" class="magnify" src="<?php print $imgSrc; ?>"/><br><?php print $pageName; ?></td>
The part i am having issue with is the " print $imgSrc; " part. This is the area where my php will create the src path. It uses this variable $imgSrc to get the correct path.
That variable is:
$imgSrc = "images"."/".$pageName."/".counter();
Which writes the