• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

test please delete

Collapse
This is a sticky topic.
X
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by NickFitz View Post
    PHP?

    What you're seeing there is HTML, with bits of PHP code embedded in it.

    Basically, a PHP file can either be pure code, or an HTML template, similar to ASP and JSP. So in something like

    Code:
    <div id="masthead">
       <h1><?php echo($site->name) ?></h1>
       <h2><?php echo($site->strapline) ?></h2>
    </div>
    <ul id="navigation">
       <?php foreach($site->pages as $page) : ?>
       <li><a href="<?php echo($page->URL) ?>"><?php echo($page->title) ?></a></li>
       <?php endforeach ; ?>
    </ul>
    there's actually a load of HTML and PHP mashed together.

    Of course some buffoons will have loads of business logic and database access stuff all mixed in together with the HTML, but a competent developer should have abstracted all that away into separate files.

    Such PHP on its own looks more like C++, Java or JavaScript:

    Code:
    <?php
    
    class Category {
        
        var $id;
        var $title;
        
        function Category($id, $title) {
            $this->id = $id;
            $this->title = $title;
        }
    
        function capitalise_title() {
            return strtoupper($this->title);
        }
    
    }
    
    ?>
    (That's PHP4 - there's better syntax for class definitions in PHP5.)
    Nick comes to the rescue!
    That boy go raaaaaaa
    Copyright (C) BabyBear1 - with thanks to VF for hosting

    Comment


      It was bugging me so I sorted out the Diablo Network all tidy now
      That boy go raaaaaaa
      Copyright (C) BabyBear1 - with thanks to VF for hosting

      Comment


        A bit of Plan B to do...
        That boy go raaaaaaa
        Copyright (C) BabyBear1 - with thanks to VF for hosting

        Comment


          ..few emails to send...
          That boy go raaaaaaa
          Copyright (C) BabyBear1 - with thanks to VF for hosting

          Comment


            The lady is asleep, she has an early meeting tomorrow...
            That boy go raaaaaaa
            Copyright (C) BabyBear1 - with thanks to VF for hosting

            Comment


              I'm at home tomorrow
              That boy go raaaaaaa
              Copyright (C) BabyBear1 - with thanks to VF for hosting

              Comment


                Got a client coming round....
                That boy go raaaaaaa
                Copyright (C) BabyBear1 - with thanks to VF for hosting

                Comment


                  So have to prepare a few things...
                  That boy go raaaaaaa
                  Copyright (C) BabyBear1 - with thanks to VF for hosting

                  Comment


                    And finally....Kids asleep, husband in safe but snoring....and I can now have my 2nd glass of wine. Bliss

                    ED - glad you sorted your network out.

                    BYE
                    Just call me Matron - Too many handbags

                    Comment


                      Originally posted by voodooflux View Post
                      Bear, never ever to accept an invitation to drinks/networking from an agent again.
                      thanks
                      Si posse, recte, si non, quocumque modo rem

                      Comment

                      Working...
                      X