Te servirá algo así:
Código PHP:
<?php
$clientes = array ( array ('1', '539', '1', '', '539'),
array ( '2', '49.5', '12', '', '594' )
);
if ( isset ( $_POST['submit'] ) )
{
echo "<form name = \"formu\" action = \"".$_SERVER['PHP_SELF']."\" method = \"POST\">";
for ( $e = 0; $e < count ( $clientes ); $e++ )
{
echo "ID de artículo: ".$clientes[$e][0]."<br/>\n";
echo "Precio de artículo: ".$clientes[$e][1]."<br/>\n";
echo "Cantidad de cuotas: ".$clientes[$e][2]."<br/>\n";
if ( $_POST[ 'cantidad'.$clientes[$e][0] ] != '' )
{
echo "La Cantidad de cuotas se modifico a: <input type = \"text\" name = \"cantidad".$clientes[$e][0]."\" value = \"".$_POST[ 'cantidad'.$clientes[$e][0] ]."\"><br/>\n";
echo "Total: ".$_POST['cantidad'.$clientes[$e][0] ] * $clientes[$e][1]."<p>\n\n";
}
else
{
echo "Cantidad: <input type = \"text\" name = \"cantidad".$clientes[$e][0]."\"><br/>\n";
echo "Total: ".$clientes[$e][2] * $clientes[$e][1]."<p>\n\n";
}
}
echo "<input type = \"submit\" name = \"submit\" value = \"Actualizar\"";
echo "</form>";
}
else
{
echo "<form name = \"formu\" action = \"".$_SERVER['PHP_SELF']."\" method = \"POST\">";
for ( $e = 0; $e < count ( $clientes ); $e++ )
{
echo "ID de artículo: ".$clientes[$e][0]."<br/>\n";
echo "Precio de artículo: ".$clientes[$e][1]."<br/>\n";
echo "Cantidad de cuotas: ".$clientes[$e][2]."<br/>\n";
echo "Cantidad: <input type = \"text\" name = \"cantidad".$clientes[$e][0]."\"><br/>\n";
echo "Total: ".$clientes[$e][2] * $clientes[$e][1]."<p>\n\n";
}
echo "<input type = \"submit\" name = \"submit\" value = \"Actualizar\"";
echo "</form>";
}
?>
Hojala te pueda dar otra idea para resolver tu problema. Suerte