Is there a way to assign multiple variables a single value on a single line?

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Is there a way to assign multiple variables a single value on a single line?

    i tried

    $f1, $f2, $f3 = '1';
    and
    list($f1, $f2, $f3) = 1;

    neither work... second obviously cuz its looking for an array on the right
    side, correct?

    Right now i have ot build a for loop to assign the values


    Brandon Lamb Guest

  2. Similar Questions and Discussions

    1. Quering rows in a table and outputing on single line
      Hi, I would really appreciate any help with the following: I want to use a single query to extract the data below (this is a small sampling of...
    2. split single pdf doc to many based on line/column
      Can anyone share with me a method of splitting a single PDF document into multiple PDF documents based a value in a particular location(i.e.,...
    3. form: single line -- multiple text boxes -- one typing field - how?
      please excuse my ignorance. am a newbie. I saw a fillable form, that shows:- a single line with multiple text boxes for entering each letter of a...
    4. HOW-TO: Enable whole DataGrid in edit mode, instead of a single line
      I havent tried this so its only a suggestion... data bound) the Textboxes.Readonly = False Set Textboxes.Readonly = true Not dificult, but a...
    5. Background Color change on a SINGLE line of text.
      Thanks, but that won't work for what I'm doing. I'm creating a user populatable multi-select field. If there are a large number of options both...
  3. #2

    Default Re: Is there a way to assign multiple variables a single value on a single line?

    Brandon Lamb wrote:
    > i tried
    >
    > $f1, $f2, $f3 = '1';
    > and
    > list($f1, $f2, $f3) = 1;
    >
    > neither work... second obviously cuz its looking for an array on the
    > right side, correct?
    >
    $f1 = $f2 = $f3 = '1';

    JW



    Janwillem Borleffs Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139