I was looking on php.net, and it mentioned that you could do a (while inside of while)
PHP Code:
<?PHP
$i=0;
while($i < count($one)) {
while($a = each($two)) {
echo $a[1]." - ".$one[$i].", ";
}
$i++;
}
?>
but when I try this it crases my system. no good i know. I am wondering if anyone has any experiance with this?
piece of my code with what i am trying to do
PHP Code:
<?php
echo "<form name='namestoupdate' method='post' action='update.php'>\n";
$i = 0;
while ($i < $num) {
$id = mysql_result($query,$i,"id");
$title = mysql_result($query,$i,"title");
$filetype = mysql_result($query,$i,"filetype");
$document = mysql_result($query,$i,"document");
echo "<tr>";
echo "<input type='hidden' name='id[$i]' value='$id'>";
echo "<td>".$id."</td>";
echo "<td><input type='text' size='20' name='title[$i]' value='$title'></td>";
//This is where I want the second while stmt to go
echo "<td><select name=filetype>";
echo '<option value="'.$filetype[$i].'" selected="'.$filetype.'">'.$filetype.'</option>';
echo "</select></td>";
echo "<td><input type='text' size='20' name=document[$i]' value='$document></td>";
echo "</tr>";
++$i;
}
echo "<input type='submit' value='submit'>";
echo "</form>";
mysql_close();
?>
Thanks in advance
Bookmarks