+ Reply to Thread
Results 1 to 2 of 2

Thread: PHP variable organization

  1. #1
    bentro is offline x10Hosting Member bentro is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    2

    PHP variable organization

    When you make long pages of php that you are using multi variables in, I recommend declaring the variables at the top of the page like this

    PHP Code:
    <?php
    if(isset($_POST["var1"])){$var1==$_POST["var1"]}

    //Content

    ?>
    this makes the coding less confusing and easier to read

  2. #2
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: PHP variable organization

    I do that frequently, except I prefer to use !empty to check my variables. A variable can remain set even if has a NULL value.

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


+ Reply to Thread

Similar Threads

  1. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  2. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  3. Sigo con problemas con phpbb2
    By reciecho in forum Soporte
    Replies: 7
    Last Post: 10-20-2007, 06:28 PM
  4. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers