Announcement

Collapse
No announcement yet.

Web Developers! Where you at?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Web Developers! Where you at?

    Cause I need some help. I'm a PHP n00b, and we are doing loops for class, and I have no idea what the hell I am doing so any help would be much appreciated.
    - Kielan (Key-lin)

  • #2
    omg me 2
    Dude... My nissan has like a v8, man.

    Comment


    • #3
      flickrrrrrrrrrrrrrrrrrrrr

      Comment


      • #4
        Shits ridiculous that's why.
        - Kielan (Key-lin)

        Comment


        • #5
          Afraid I'm more design and front-end stuff (CSS, HTML, etc.). What's your question, maybe I can help find the answers?
          Will design/build websites for wheels

          Comment


          • #6
            W3?
            flickrrrrrrrrrrrrrrrrrrrr

            Comment


            • #7
              Originally posted by Pir8 97 View Post
              Afraid I'm more design and front-end stuff (CSS, HTML, etc.). What's your question, maybe I can help find the answers?
              This is what I have to do.
              4. Take the array from exercise 3 and display it using 1) a for loop, 2) a while loop, and 3) a do-while loop. Display what type of loop you used before the output, and put each loop in its own paragraph.
              NOTE: Remember the semicolon at the end of the do-while loop! Also, remember to use $index++ in your while and do while loops or they won't increment! (and your browser will crash).


              Originally posted by eskimopunk View Post
              W3?
              I've got a PHP book in front of me, but I need to display 3 things using a for loop and I can't get it to do it, I can make it display 1, but not 3 its quite frustrating.
              - Kielan (Key-lin)

              Comment


              • #8
                What's the array from exercise 3?
                Will design/build websites for wheels

                Comment


                • #9

                  PHP Lab 7

                  Example 1



                  echo "

                  Hello World!

                  ";
                  ?>

                  Example 2


                  $room_num = "208 IST";
                  $time = "4:15-5:30";
                  $professor = "Dr. Aungst";
                  $section = 556201;
                  define("COURSE", "IST 210");

                  echo $room_num;
                  echo "
                  ";
                  var_dump ($time);
                  echo "
                  ";
                  print_r ($professor);
                  echo "
                  ";
                  echo $section;
                  echo "
                  ";
                  echo COURSE;
                  ?>

                  Example 3



                  $animals[0] = "cow";
                  $animals[1] = "dolphin";
                  $animals[2] = "elephant";

                  echo "\$dbms = ". $animals[0];
                  echo "
                  ";
                  echo "\$mysql = ". $animals[1];
                  echo "
                  ";
                  echo "\$php = ". $animals[2];
                  echo "
                  ";
                  ?>

                  Example 4



                  echo "

                  For Loop

                  ";
                  for ($animals=0;$animals<=2; $animals++);
                  {
                  echo "$animals. cow
                  ";
                  }
                  ?>

                  - Kielan (Key-lin)

                  Comment


                  • #10
                    that's better...
                    Will design/build websites for wheels

                    Comment


                    • #11
                      Try this

                      For
                      $elements = count($animals) - 1;
                      for ($i = 0; $i <= $elements; $i++) {
                      echo $animals[$i] . '
                      ';
                      }


                      While
                      $elements = count($animals) - 1;
                      $i = 0;
                      while ($i <= $elements) {
                      echo $animals[$i] . '
                      ';
                      $i++;
                      }


                      do while
                      $elements = count($animals) - 1;
                      $i = 0;
                      do {
                      echo $animals[$i] . '
                      ';
                      $i++;
                      } while ($i <= $elements);


                      Courtesy of my favorite programmer.
                      Will design/build websites for wheels

                      Comment


                      • #12
                        There are a ton of hidden characters in there, any chance you could put it in a txt file and email it to me? kielan.prince@gmail.com

                        THANK YOU SO MUCH DUDE!
                        - Kielan (Key-lin)

                        Comment


                        • #13
                          Email sent
                          Will design/build websites for wheels

                          Comment


                          • #14
                            That worked perfectly, thank you so much!
                            - Kielan (Key-lin)

                            Comment


                            • #15
                              Stance|works... Even in computer class
                              cars and stuff

                              Comment

                              Working...
                              X