Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member Alanna Baxter's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    188
    Member #
    29061
    Liked
    18 times
    Hi,

    I got a PHP book and I'm teaching myself. In the past I have been using Notepad++ and found it very useful. But this book is recommending that I install an IDE. Is it necessary for me to install yet another program editor? Can I get away with just using Notepad++?

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,724
    Member #
    5580
    Liked
    718 times
    Alanna ... stay with Notepad++

    Notepad++ color codes lines, numbers lines, and when you highlight parentheses, brackets, tags, etc, it highlights the closing ones, making it easy to find unclosed elements.

    You'll learn the most by finding examples (or snippets) of PHP script, copying them to Notepad++, and uploading to your website. Create a directory on your website just for testing and experimenting with code.

    Example,
    Below is a snippet of PHP to grab images (photos) from a directory, put the filenames into an array, shuffle them (random) and display the first five of them. I store this one away in a file called, PHP_read_dir_grab_photos.php

    When I need to use that in a script, I consult my directory full of snippets to find something to use.

    PHP Code:
    <?php
    // folder name where they are stored.
    $folder_name="photos";
    // put only these types of images into an array.
    $images array_merge(
    glob("$folder_name/*.jpg"),
    glob("$folder_name/*.png"),
    glob("$folder_name/*.gif")
    );
    // Randomize the array.
    shuffle($images);
    // Display the first 5 random images.
    echo"
    <img src='
    $images[0]' /><br />
    <img src='
    $images[1]' /><br />
    <img src='
    $images[2]' /><br />
    <img src='
    $images[3]' /><br />
    <img src='
    $images[4]' /><br />
    "
    ;
    // If you would rather display all of them.
    //foreach($images as &$img){
    //echo "<img src='$img' /><br />";
    //}

    ?>
    I have tons of test pages on my website for experimenting with code.
    Also dozens of snippets of things I might need to do that I forget about.

    Experiment and make mistakes. Make lots of mistakes and find the solutions to them.
    That's how you will learn ... not by using some "recommended" IDE.

    Also ... books tend to be outdated really quickly.
    Alanna Baxter likes this.


  4. #3
    Senior Member Kayo's Avatar
    Join Date
    Dec 2006
    Location
    Brampton Ontario
    Posts
    416
    Member #
    14523
    Liked
    39 times
    If you are doing Java or ASP.Net, maybe. But with PHP, IDEs add little benefit if you do not want to use it. Just use something like Wamp (or whatever is popular now) to run the scripts after you typed the code in Notepad++.
    Alanna Baxter likes this.

  5. #4
    Senior Member Alanna Baxter's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    188
    Member #
    29061
    Liked
    18 times
    Thanks, guys. I have WAMP installed from a previous site I was building/testing. I was hoping I could just stick with Notepad++ because it's what I'm used to.

    You might be right, Max. The book I'm using is PHP, MySQL & JavaScript, by Robin Nixon, copyright 2009. But I think it's a good place to start.

    Do you rely a lot on code snippets? I was thinking I should know how to write code and write it well.

    BTW, Max, I'm going to copy/paste your little snippet and play around with it. Thanks!

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,724
    Member #
    5580
    Liked
    718 times
    I don't rely on them ... but I use them along with a lot of other code. If stuff is already written, it can save you a lot of time. But like everything else, there's always more than one way to accomplish tasks. This may sound strange, but I actually learn the most by attempting to answer someone else's question about a PHP script, or help with trouble they have doing some PHP programming. Usually, I end-up walking down some PHP road that I've never been to ... and I learn so much from that. Case in point, OpenCart. My very first encounter with that, but now I've learned a few things about it.


  7. #6
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Quote Originally Posted by mlseim, post: 247072
    I don't rely on them ... but I use them along with a lot of other code. If stuff is already written, it can save you a lot of time. But like everything else, there's always more than one way to accomplish tasks. This may sound strange, but I actually learn the most by attempting to answer someone else's question about a PHP script, or help with trouble they have doing some PHP programming. Usually, I end-up walking down some PHP road that I've never been to ... and I learn so much from that. Case in point, OpenCart. My very first encounter with that, but now I've learned a few things about it.
    I have learned more by answering questions (or trying to answer them!) on these boards than I ever would just doing stuff on my own. Some of the questions have to do with situations that I would never dream I'd encounter in what I do - but they often lead me to answers that I can apply to my work at some point.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  8. #7
    Senior Member Alanna Baxter's Avatar
    Join Date
    Aug 2011
    Location
    Ireland
    Posts
    188
    Member #
    29061
    Liked
    18 times
    I try to figure stuff out myself first before bombarding the forum with too many questions. But if you are working on your own trying to build sites, there's really no one to ask when you run into problems so this site is fantastic for that! Right now I'd have more questions than answers but I agree with you guys. I'm learning a lot just by asking questions.

    Hopefully, I'll get to the point where I learn a lot from answering questions!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:50 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com