Jump to content
Old threads will finally start getting archived ×
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 ×

Search the Community

Showing results for tags 'switch'.

  • Search By Tags

    • switch ×
    Type tags separated by commas.
  • Search By Author

Content Type



Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Found 7 results

  1. class ufo { const MP_SIZE_LARGE = 600; const MP_SIZE_MEDIUM = 400; const MP_SIZE_SMALL = 250; const LARGE = 'LARGE'; const MEDIUM = 'MEDIUM'; const SMALL = 'SMALL'; public $mp_size; public function desired_width() { switch ( $this->mp_size ) { case ufo::LARGE...
  2. Hello, I don't know if this is possible. I want to make a switch between pages, lets say i have more than 100 pages and each page have a unique name.php. So what i want to do is when page equal to random-page.php SELECT * FROM `jobs` WHERE title LIKE '%news%' And for example how...
  3. Is there a nicer, cleaner more efficient and less code way of achieving this? I have an array of rows from the database and 2 of the columns could have either of 2 values which give me 4 possibilities. I want to loop through each of them and assign the row to one of 4 arrays so they are all...
  4. <html> <head> <!--title>Hello</title--> <link rel="stylesheet" href="uvcs.css" type="text/css" /> </head> <body> <div id=everything> <div id=header> This is the header </div> <div id=clear></div> <div id=navmenu> <div id=navmenu> <ul> <li>...
  5. Hi, I'm making a code for determining the astrological sign of anyone. The code receives a date in this format "YYYY-MM-DD" and strips that string in year, month and day. So I've wrotten this function: //determinar signo public function Determinar(){ switch ($this->month){...
  6. Hi, I have the code below that using for a simple login system (security not a concern at all) This code works but it now has around ten if statements (not included them all for clarity), would this be best written as a switch statement? if so can you help me code it. I can write basic switc...
  7. I have a switch that uses a rand() to find the respective cases in between a number range, like so: switch($number = rand(1,10)) { case ($number > 1 && $number <= 5): doFunction(); break; case ($number > 5): doFunction(); break; } how would I use this in an ar...
×
×
  • 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.