Page 3 of 4 FirstFirst 1234 LastLast
Results 51 to 75 of 93

Thread: Basics Of PHP

  1. #51
    Join Date
    Feb 2012
    Location
    United Kingdom
    Posts
    13
    Thanks for this small guide, it's helped me further understand some aspects of PHP, I'm still a newbie at this, and I'm hoping to develop using simplistic guides & the use of the php.net manual -- That's great.

    Thanks,
    Chris.

  2. #52
    Comma concatenation is often overlooked, in my opinion.
    If working with large blocks of text it can reduce the load somewhat.

    Example:
    PHP Code:
    <?php
    echo $var1 $var2 $var3;
    ?>
    Is a lot slower than:
    PHP Code:
    <?php
    echo $var1 $var2 $var3;
    ?>

  3. #53
    Join Date
    Nov 2011
    Posts
    153
    Quote Originally Posted by Elev8 View Post
    Comma concatenation is often overlooked, in my opinion.
    If working with large blocks of text it can reduce the load somewhat.
    NOTE: Comma concatenation only works with echo
    if you use print you will get a syntax error message

  4. #54
    Quote Originally Posted by _GMF_ View Post
    NOTE: Comma concatenation only works with echo
    if you use print you will get a syntax error message
    ^Very good point which I completely forgot about!

    It also really only effects variables containing large amounts of text, HTML, or something similar.

  5. #55
    Websites I tend to use for learning code, not just php are:

    w3schools.com
    codeacademy.com
    http://code.google.com/edu/languages...ics/index.html

    If I think of anymore I'll post them up

  6. #56
    Thanks for reminding me php.. I an so focus with networking.. I think i need to read back and experiment again with php .. Thanks!

  7. #57
    Quote Originally Posted by Elev8 View Post
    Comma concatenation is often overlooked, in my opinion.
    If working with large blocks of text it can reduce the load somewhat.
    Technically, that's b/c it's not a concatenation. Just echoing one after the other.

    It would have the same performance as
    echo var1;
    echo var2;
    echo var3;

  8. #58
    PHP stood for "Personal Home Page" until the end of PHP version 3 or so, when Zend took over the majority of it's development. Presently it's the recursive acronym "PHP: Hypertext Preprocessor", or something like that.

    As far as learning PHP, once I had the basics of the language down I started looking at some commonly used open source projects such as PhpMyAdmin, PhpSysInfo, and Wordpress. I tried to think of a very simple fix/refactor/new feature and I spent a weekend trying to implement it.

  9. #59
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    39
    Fantastic tutorial! Took me a while to read but it was well worth it.

    Thank you very much,
    Phil

  10. #60
    Major thanks for the article. Will read on...

  11. #61
    You guys need to buy a book. PHP is really a good language to study as the first language you want to learn.

  12. #62
    Thank you for good topic

  13. #63
    Good short, tutorial, good for new people wanting to learn PHP.

  14. #64
    Great topic for the learners

  15. #65
    Nice man. I'm going to have to get more in-depth into this stuff next year of college. Will be good to have a head start with these types of tutorials.

  16. #66
    Join Date
    Aug 2010
    Location
    Belgium
    Posts
    46
    Quote Originally Posted by horizon View Post
    Nice block from SNC. However, I'd state this line:

    PHP Code:
    $ip getenv("REMOTE_ADDR"); 
    for:

    PHP Code:
    $ip = (isset($_SERVER['REMOTE_ADDR'])) ? $_SERVER['REMOTE_ADDR'] : getenv("REMOTE_ADDR"); 
    You can just do $_SERVER['REMOTE_ADDR'];
    isset and getenv will only slow it down, $_SERVER and getenv do just the same, the only difference is that you can do getenv('remote_addr') but function call is slower than array call (#micro optimization)

    Quote Originally Posted by risoknop View Post
    First of all, I suggest abiding to some coding standards and/or best practices, one line condition statements for example aren't recommended.

    [code]
    Secondly, you should use enctype attribute with HTML forms for security reasons, for instance:

    Code:
    <form enctype="application/x-www-form-urlencoded" method="post" action="/controller/action">
    ]
    This is false as well, this enctype is default one so you don't have to specify it only if you need something different. The less text in your html the smaller so faster.

  17. #67
    Join Date
    Mar 2012
    Posts
    489
    Yes, I am agree too. Phpmanual gives all the details along with the exact syntax and needed options for each function so if we study it well there is no need of ebooks.

  18. #68
    Thats pretty basics of PHP, can you point us to place to learn better about all functions and how to use it in PHP?

  19. #69
    this will help beginner to start and they can continue with w3schools too

  20. #70
    Join Date
    Sep 2012
    Posts
    46
    Nice topic. Definately going to get some use of it later.

  21. #71
    Great tutorial you have posted and some very knowledgeable replies to go with it. Even if you know PHP, it is still nice to refresh your mind once in a while to remember everything about it. Some very good points made for sure.

  22. #72
    Join Date
    Sep 2012
    Location
    Frankfurt
    Posts
    22
    Pretty nice topic for beginners.

  23. #73
    PHP is a powerful tool for making dynamic and interactive Web pages.
    PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

  24. #74

    Thumbs up basics of php tutorial

    for best learning of php basics u can see this blog
    http[://]phpden.blogspot.in/2012/09/php-basic-syntax.html

  25. #75
    Nice, great PHP tutorial for beginners. Do you intend to create more parts of this tutorial?

Page 3 of 4 FirstFirst 1234 LastLast

Related Posts from theWHIR.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •