Jump to content

wdmarto

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wdmarto's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oh! That's what I searched for. I didn't know how to use eval() function. Thanks for your help! I appreciate. Mart
  2. Thanks, but what if I don't know the content of the string. $str = $_REQUEST['op']; // op si a mathematical operator like +, -, *, / print(2.$str.3); // I want to calculate the result of 2 "operator" 3 I'm not sure that my question is clear enough. But thanks again. Mart. [!--quoteo(post=362232:date=Apr 6 2006, 10:27 AM:name=G F D)--][div class=\'quotetop\']QUOTE(G F D @ Apr 6 2006, 10:27 AM) [snapback]362232[/snapback][/div][div class=\'quotemain\'][!--quotec--] [code] <?PHP $str = "2+3"; echo "$str = "; echo 2+3; ?> [/code] Something like that you mean? The output would look like this: [/quote]
  3. I would like to resolve that problem: I have this variable: $str = "2+3"; And I want to print the result of the operation included in that string. How can I do that? Thanks. Mart
×
×
  • 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.