Hi all,
I have some problems with the foreach() function. Why can't I get the max() value of > "max($key)" . I know that the max_value is "1" and I want to add to the max_value +1
<?php
//bank.php
$banque_num[0] = "BK1|654321|LU123456789123456789";
$banque_num[1] = "BK2|123456|LU654789612323232323";
?>
<?php
//text.php
echo"<table border=\"0\">
<tr>
<td>Bank Name</td>
<td>SWIFT</td>
<td>Account Numbe</td>
<td colspan=\"2\"> </td>
</tr>";
asort($banque_num);
foreach ($banque_num as $key => $banque_num) {
$echo_banque_bank = explode("|",$banque_num);
echo"
<tr>
<td><input type=\"hidden\" size=\"1\" name=\"bkid\" value=\"$key\"><input type=\"text\" name=\"new_perso_address_emailinfo\" maxlength=\"30\" size=\"20\" value=\"$echo_banque_bank[0]\"></td>
<td><input type=\"text\" name=\"new_perso_address_emailinfo\" maxlength=\"8\" size=\"8\" value=\"$echo_banque_bank[1]\"></td>
<td><input type=\"text\" name=\"new_perso_address_emailinfo\" maxlength=\"20\" size=\"22\" value=\"$echo_banque_bank[2]\"></td>
<td><a href=\"$PHP_SELF?do=del&bkid=$key\"><img border=\"0\" width=\"16\" height=\"16\" src=\"/images/layout/$style/buttons/b_drop.png\"></a></td>
<td> "; if($key=="0") { echo"<a href=\"$PHP_SELF?lang=$lang&style=$style&do=add&banque_num[$test]\">[add " . max($banque_num) . "]</a>"; } echo"</td>
</tr>";
}
echo"</table>";
?>