Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. How to ?

How to ?

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
phptutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    udch
    wrote on last edited by
    #1

    "+1.80 - +2.23%" I want this like $a=+1.80; $b=+2.23%; Now can you tell me please how to do this in php ?

    F 1 Reply Last reply
    0
    • U udch

      "+1.80 - +2.23%" I want this like $a=+1.80; $b=+2.23%; Now can you tell me please how to do this in php ?

      F Offline
      F Offline
      fly904
      wrote on last edited by
      #2

      udch wrote:

      Now can you tell me please how to do this in php ?

      I don't like demands, and I'm sure others don't like them either.

      $a = 1.8;
      $b = 2.23;
      $c = $a * (1 + ($b / 100));

      If at first you don't succeed, you're not Chuck Norris.

      U 1 Reply Last reply
      0
      • F fly904

        udch wrote:

        Now can you tell me please how to do this in php ?

        I don't like demands, and I'm sure others don't like them either.

        $a = 1.8;
        $b = 2.23;
        $c = $a * (1 + ($b / 100));

        If at first you don't succeed, you're not Chuck Norris.

        U Offline
        U Offline
        udch
        wrote on last edited by
        #3

        Thanks for your help brother.It is value on a variable like :- $a="+1.80 - +2.23%"; I want to extract like $a=+1.80; $b=+2.23%; can we do this in php ?

        F 1 Reply Last reply
        0
        • U udch

          Thanks for your help brother.It is value on a variable like :- $a="+1.80 - +2.23%"; I want to extract like $a=+1.80; $b=+2.23%; can we do this in php ?

          F Offline
          F Offline
          fly904
          wrote on last edited by
          #4

          Oh, you want a substring. What you said was unclear. http://uk3.php.net/substr[^]

          If at first you don't succeed, you're not Chuck Norris.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups