PHP Help

Discussion in 'HTML & Website Design' started by Teresa McCraw, Aug 27, 2008.

  1. #1
    Can I use php scripts in my WYSIWYG Editor. I work well in html but not php. I have several clone scripts but they are in php. Can I use them in my WYSIWYG HTML Editor and build a site around it? If not can I convert php to html?
     
    Teresa McCraw, Aug 27, 2008 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    You can create your html in your editor but the WYSIWYG editors tend to corrupt the script portion.

    I suggest you use a product like notepad2 (free download) to combine your html into your scripts.

    Even if you configure your server to treat html as php the editors will still tend to mess it up when you are working with the source code.
     
    Colbyt, Aug 27, 2008 IP
  3. Grit.

    Grit. Well-Known Member

    Messages:
    1,424
    Likes Received:
    22
    Best Answers:
    1
    Trophy Points:
    110
    #3
    I'd advise getting an editor that enables code highlighting, such as notepad2 (mentioned above)
     
    Grit., Aug 27, 2008 IP
  4. risoknop

    risoknop Peon

    Messages:
    914
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can write HTML markup inside PHP files.

    First, you will need a PHP interpreter installed on your PC so you can test the page. I recommend AppServ for Windows.

    Just save your page with .php extension and you can write HTML code into it.

    To divide PHP code from HTML markup, you can use the following:

    
    Some HTML markup...
    
    <?php
    
    Here goes PHP code...
    
    ?>
    
    Some HTML markup...
    
    Code (markup):
    You can output HTML markup even inside PHP code. Use functions echo() or print() for that:

    
    <?php
    
    echo "<p>Text</p>";
    print "<p>Text</p>";
    
    ?>
    
    Code (markup):
    You get the idea. I don't have time to go further so please see PHP Web site for complete documentation.
     
    risoknop, Aug 27, 2008 IP