You can see what I am trying to do which obviously will not work ... $host$i embeded into a while statement while stepping $i by 1
Code: Select all
//here is the value we do not know... could be 2 or 63 we are just unsure
$hostlines= $_POSTї'hostlines'];
$i = 1;
while ($i < $hostlines){
$host$i = $_POSTї'host$i'];
$i++;
}
//this is what I want as a result
echo "$host1, $host2, $host3, $host4,";Basically I am trying to automate this:
$host1 = $_POST['host1'];
$host2 = $_POST['host2'];
$host3 = $_POST['host3'];
$host4 = $_POST['host4'];
hostlines is comming from <input's> on a form. all the inputs have dynamicly created name="host1" or name="host8"
You deserve a gold star if you can make this happen!
- Nirus