Results 1 to 9 of 9

Thread: HTML files saved with a PHP extention

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2003
    Posts
    3,040

    Default count in forloop

    One simple optimization that most people miss is not using count($var) as a condition of for loops.


    PHP Code:
    // Wrong
    for ($i 0$i count($Results); $i++)
    {
    // Do Something


    PHP Code:
    // Correct
    $ResultCount count($Results);
    for (
    $i 0$i $ResultCount$i++)
    {
    // Do Something

    It’s very simple, and now you’re not counting the size of the stack every time you process the loop.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  2. #2
    Join Date
    Sep 2009
    Posts
    4

    Default

    I dont think so...It depents how it comfortable for you

  3. #3
    Join Date
    Oct 2009
    Posts
    4

    Default

    i dont knoww

  4. #4
    Join Date
    Oct 2009
    Posts
    3

    Default

    Looking out what that ball out

Bookmarks

Posting Permissions

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