Navigation

    ask avan logo
    • Register
    • Login
    • Search
    • Categories
    • Unsolved
    • Solved
    1. Home
    2. Tags
    3. php
    Log in to post
    • MPG Radio

      UNSOLVED Switch statement php
      PHP • php • • MPG Radio  

      5
      5
      Posts
      46
      Views

      avan

      What about an if statement within each switch case?

      switch ($date) { case 'Jan': $content = "Dahnus"; if(CONDITION HERE) { EXECUTE CODE HERE } //$content = " Pisces"; //$content = " Aries"; break; case 'Feb':
    • Leo Lesole

      UNSOLVED How To pair and rearrange string values from a variable in PHP ?
      PHP • javascript php • • Leo Lesole  

      2
      2
      Posts
      12
      Views

      avan

      Hey @Leo-Lesole

      To do string concatenation in PHP you can use a period (dot)
      Example:

      $DataToDB = "Parttype=".$partType."&LabelPart=".$labelPart."&PartBin=".$partbin;

      Not sure if that is what you had in mind. Let me know.

    • J

      UNSOLVED PHP for loop over array acting weird..
      PHP • array for loop php • • jimmi  

      2
      2
      Posts
      13
      Views

      avan

      @jimmi

      What is $sectionamount ? Is that the same as $hoevelsections ?

      What is the purpose of it? Are you trying to print all items in the last array you listed:

      Array ( [0] => Entrance [1] => Door & Door frame [2] => Kombuis [3] => vloer [4] => kaste [5] => Kamer [6] => gang [7] => bed [8] => mat )