I have this code: codepad.viper-7.com/ouwCTb instead of dash in the calendar I want to show the dates form previous and next months. Can anyone please help me to fix the code so that it start showing dates instead of dashes.
$now = new DateTime();
print_r($now);
print $now->date; // print the current date
BUT if print_r($now); is comment it show error ?
$now = new DateTime();
print $now->date; // Notice: Undefined property: DateTime::$date in
@LeviMorrison If / when you are going to add the edit button on the php.net man pages could you also make it a bit more clear without being obstrusive?
@PeeHaa sometimes the XML being edited in the editor is out of sync with the latest commits, so if someone added that modifier in at some point after the person started editing the file then it will show in the diff... I'm not saying that's definitely the case here.
@SabilValdano asking whether something is "better" requires you to put something you want to compare it to.
@SabilValdano also, ending a question with "or …" puts people's mind on the "or" and the likelihood of them deciding that it is indeed "or" is much higher.
@Gordon oh ya , i forgot to tell, i usually write PHP Code in Notepad ++ and later this week i do smoe research about other php editor, and found net bean quite interesting
I want to turn on the feature where whenever I hover over a hyperlink and in the bottom lefthand corner it shows a light blue hover tooltip about where that link goes.
It looks like that since some days this earlier always-on feature is missing (Compare "Turn off the link hover statusbar in Goo...
@SabilValdano it depends on what you are looking for in an IDE. Netbeans is good. And it has more features than Notepad++ but if you don't use these featues, you don't need Netbeans. With that said, I like PHPStorm better than Netbeans, but that's just personal preference. The best way to find out if Netbeans is for you, is to try it. You don't have to use one. I know people who do all their coding in VIM.
@SabilValdano Zend Studio, PHPStorm and Netbeans are all quite good when it comes to IDEs. But like I said, you don't have to use an IDE. It depends on how you work.
@rdlowrey Poor. I know this without testing, @Danack, because the class model you are using in JS is even more of an anti pattern than the one I shall be implementing in a pull request you shall be receiving shortly :-P
@Gordon Perhaps, but I find that on too many occasions do I need to open the source file myself or copy-paste the method names, it's really irritating. Storm gets it right away.
Is there a way to determine whether an array is indexed or associative without iterating it? (and by indexed I mean contiguous int keys staring from 0, anything else is associative)
@Mr.Alien: I don't see why you see the need to explain yourself. The downvote is justified. The question is badly formatted, and lacks research effort. You should shape up, edit the question, and it would be nominated for reopening. — Madara Uchiha34 secs ago
@Jimbo That's iterating the array twice (three times? IIRC count does a full scan to check consistency as well), and creating another array of the same length and iterating that in full as well. Even I can think of a more efficient way than that, array_values($arr) === $arr
@DaveRandom I guess you can't avoid iteration. The most optimal way I can think of is to search any key that violates your definition of indexed array.
@PLB Yes that's my favoured approach too. But for a large indexed array (or an array that doesn't fail until a long way through) that's still horrendously inefficient
Right, well that reads the entire file into memory. stream_copy_to_stream() copies from one file pointer to another - so you open $src in read mode an $dst in write mode and just attach them to each other, it uses barely any memory and may actually be slightly faster as well (depends on your hardware and well ordered your HDD is though)
@PLB You wouldn't gain anything, none of those calls are blocking, it's just a mem check
Is there a way to determine whether an array is indexed or associative without iterating it? (and by indexed I mean contiguous int keys staring from 0, anything else is associative)
@DaveRandom If you have control how arrays are created. You may want to implement ArrayAccess and Iterator? So you can be sure it will be indexed and no check will be necessary.
@HamZa I'm sure it doesn't as I'm not sure I totally understand it yet. The rewrite rule at the bottom will only be applied if all the above conditions are true?
Most of the times it helps to read the manual: >>> The order of rules in the ruleset is important because the rewrite engine processes them in a particular (not always obvious) order, as follows: The rewrite engine loops through the rulesets (each ruleset being made up of RewriteRule directives, with or without RewriteConds), rule by rule. When a particular rule is matched, mod_rewrite also checks the corresponding conditions (RewriteCond directives). For historical reasons the conditions are given first, making the control flow a little bit long-winded. See Figure 1 for more details.
@HamZa Yeah I did.. Am I right in saying that if the rewrite rule is matched, and all of the rewrite conditions are matched, then the rewrite rule is applied?
Does anyone feel like giving me a little bit more in depth help? I've been locked out of my site because I've changed the url and this pesky security plugin has loads or rewrite rules that I'm struggling to decipher