Jump to content

niche

Members
  • Posts

    3,671
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by niche

  1. Please post your relevant code using the code tag

    Also, what are you using server side?

    or, do you plan to handle your form results client side

     

     

  2. then your code would look something like this:

    $acct_a = 'company abc';
    $acct_b = 'company stu';
    $acct_c = 'company xyz';
    $val_1 = 35;
    $val_2 = 1007;
    $val_3 = 20004567543;
    $accounts = array($acct_a=>$val_1, $acct_b=>$val_2, $acct_c=>$val_3);
    var_dump($accounts);

    Now everything is variable

    EDIT:

    Be sure to use => instead of =  AND use array_push() to add to your array

    https://www.w3schools.com/php/func_array_push.asp 

     

     

     

×
×
  • Create New...