So I’m trying to set up a function that will loop itself X times
per specified in my array and am having some troubles. I am
not a PHP Guru yet and am still figuring out the basics. A bit
of help would be greatly appreciated.
Let me post code, and I’ll run you through so you can see:
This array specifies my count, my file extension, and my name.
[code=php]
<?php $token = uniqid();
$noko = array(0 => ‘3’,1 => ‘ie6’,2 => ‘IEC Cable (16 AWG) YY-3/ST3’);
?>
This is what the form data looks like
[code=html]
<?php $token = uniqid();
$noko = array(0 => ‘3’,1 => ‘ie6’,2 => ‘IEC Cable (16 AWG) YY-3/ST3′);
?><div class=”size”>
<form action=” name=”ID_<?=$token;?>”>
<p><img alt=” class=”pImg” name=”imgBig_<?=$token;?>” src=”<?=$src.$noko[1];?>-01-m.jpg” width=”170px” height=”170px” /></p>
<div class=”tImg sColor”><a href=”<?=$url.$noko[1].’.php’;?>”><?=$noko[2];?></a></div>
<div class=”ico”>
<img alt=” onMouseOver=”roll(‘<?=$src.$noko[1];?>-01-m.jpg’,'<?=$src.$noko[1];?>-01-m.jpg’,'<?=$token;?>’,’00’);” src=”<?=$src.$noko[1];?>-01-ico.jpg” />
<img alt=” onMouseOver=”roll(‘<?=$src.$noko[1];?>-02-m.jpg’,'<?=$src.$noko[1];?>-02-m.jpg’,'<?=$token;?>’,’01’);” src=”<?=$src.$noko[1];?>-02-ico.jpg” />
<img alt=” onMouseOver=”roll(‘<?=$src.$noko[1];?>-03-m.jpg’,'<?=$src.$noko[1];?>-03-m.jpg’,'<?=$token;?>’,’02’);” src=”<?=$src.$noko[1];?>-03-ico.jpg” />
</div>
<div class=”arrow”>
<img alt=” src=”http://omnisistem.com/images/1up.gif” name=”up_arrow_<?=$token;?>_00″ width=”20px” />
<img alt=” src=”http://omnisistem.com/images/pixel.gif” name=”up_arrow_<?=$token;?>_01″ width=”20px” />
<img alt=” src=”http://omnisistem.com/images/pixel.gif” name=”up_arrow_<?=$token;?>_02″ width=”20px” />
<input type=’hidden’ value=”3″ name=”icoLength<?=$token;?>”>
</div>
</form>
</div>
I would like to look the contents of DIV Class [b]ico
DIV Class [b]arrow
to have a function that will write the entire code chunk from
DIV Class [b]size
need two incrementing variables, on for the image extension,
and one for the JavaScript position. I would also need to
str_pad_left for leading zeros on counts => 10.
For future sight, $noko will eventually be replaced by either
SQL insert, or by XML Style sheets. This is a farther future
thing, but good to keep in mind incase my resolution will
have a major code overhall in the future!
Thanks Every/Any-one!