Forum Moderators: coopster
MY question i have a variable the name of it is
it48, the it is always constant the 48 changes according to a variable hence it's declared in a form and submitted.
echo "<input type=\"text\" name=\"it$CCI\" size=\"5\" value=\"$CIQ\">";
now to get it back i can get the $CCI but don't know how to use the variable name in a way to give me the $CIQ
tried
$(it$k) $k gives me CCI it's from a database
and other stuff
in other words i want it to show $it48 to get the $CIQ
$newvar = "it" . $k;
echo $$newvar;
[edit]Rats, jatar_k beat me to the punch. With shorter code, to boot.[/edit]
To explain more i have a shopping cart, when u buy something u get the product in there where the quantity is changeable so the customer can change the amount requested then hits the Update button to update the quantites
what i am doing is with each fetch from db i submit
echo "<input type=\"text\" name=\"it$CCI\" size=\"5\" value=\"$CIQ\">";
CCI is different for each row in db
after it's done and when update is hit i reiterate over the db and uppdate the quantity in the database by putting the $it... var in it , well that's what it is supposed to do. Hope the explenation was more helpful