What I want to do is use a FOR loop to fetch and display the value of strings already submitted from a form.
I've tried the following code (produced to give you some idea of what I'm trying to achieve) but it doesn't work. I've also tried various manuals but they seem to be concerned with incrementally processing the VALUE of strings and not the strings themselves.
I've searched Google and various forums. I've also checked my PHP primer but it doesn't contain the answer.
$clip1="A";
$clip2="B";
$clip3="C";
$clip4="D";
$clip5="E";
$clip6="F";
$clip7="G";
$clip8="H";
$clip9="I";
$clip10="J";
for ($t=1; $t<=10; $t++)
{echo "$clip[$t]";}
I was EXPECTING the above code to fetch the value of each string in turn. What I was EXPECTING was something like this;
ABCDEFGHIJ
I get no errors. My code just produces nothing at all. What am I doing wrong?!
Thank you so, so much in advance.
$clip1, $clip2...$clip10are typestring- then in your loop you reference an undefinedarraytype variable$clip[]... that won't work - your error reporting should tell you you have an undefined variable $clip[]...