August 28, 201115 yr Hey people, so im learning PHP but I feel I keep forgetting important pieces of code i.e. how to write a file. I was just curious are their any tips I can use to help remember the language . Thanks
August 28, 201115 yr What are you writing your code in? An IDE with inline code completion can prompt you as you write.
August 28, 201115 yr PHP can be a right bugger to remember at times, especially the order of $needle and $haystack (pro tip: it's almost always $haystack first if the subject of the function is a string, and $needle if it's an array). Another oddity that gets thrown around a bit is array_map('callback', $array) vs array_filter($array, 'callback').
August 28, 201115 yr As Zed says, just keep programming... maybe making your own cheat sheets might be a good idea also, your avatar is cool... that’s my all time favourite error
August 28, 201115 yr Author Thanks guys for the help . The IDE I use is PHP designer 7. I kinda felt I couldn't learn the language as I kept forgetting code but I guess its like anything in life the more you do it the better you remember it.
August 29, 201115 yr Author That's what I'm usi9ng right now at home. Make sure you have all the code completion setting turned on. As for code snippets, well it has a nice little section called 'code snippets' where you mcan save useful snippets of code, surprisingly See View > Tool Panels > Code Snippet and it will appear to the right of your screen. Thanks this should help , I also managed to find a good cheat sheet.
August 30, 201115 yr I find code hints from my text editor invaluable, I can never remeber the corrent order of parameters inside my function parenthesis. As mentioned earlier, $needle and $haystack. I don't think I could even write an str_replace without checking the order of parameters!
August 30, 201115 yr I always have code hinting turned on in which ever IDE i use. Not just because i'd never remember all the code off the top f my head but also because it speeds up workflow thus productivity.
August 30, 201115 yr Author I always have code hinting turned on in which ever IDE i use. Not just because i'd never remember all the code off the top f my head but also because it speeds up workflow thus productivity. Thats a good point
August 30, 201115 yr I prefer notepad++ it does not have code hinting but i think theres some plugins for that
Create an account or sign in to comment