Jump to content

blastin311

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

blastin311's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I appreciate the suggestions. I am storing a drop-down list of "Options" for a product in a database. They are being pulled for display because each one is either required or optional. I don't think it will effect it much as it is a small app with little else to do than configure the the options to a product. What do you think? Too expensive for such a small app or too expensive in general. Would this work the same (or better)? $options = str_replace('"$options"', '\"$options\"', $options);
  2. That works perfectly! Thanks for the explanation too. I understand eval() a little better now. Someone can mark as Solved.
  3. Hello, I am having an issue getting the eval() to work. In my database I am storing a select box with options. I name the select box using a variable ($options): <select id="required1-$id2" name="required1-$id2" disabled='disabled' style='margin-top:5px'> <option>Choose Option</option></select> I am trying to pull this from the database and still retain use of that variable. In my while loop I am grabbing the data from the database and putting it into a variable: $options = $myrow["options"]; eval("\$options = \"$options\";"); I guess I don't understand how the eval() does its magic cause I keep getting Parse error: syntax error, unexpected T_STRING on the eval()'d code. Can anyone shine some light on this for me? Thanks in advance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.