Break a Foreach when counter reaches 5 | PHP
Can you 'exit' a loop in PHP?
I asked this question  but I haven't gotten a useful answer. Could you tell me the difference in meaning between these sentences?        Do you think you will visit them next week?     Will you visit them next week?     Are you going to visit them next week?     Are you visiting them next week?     Are you going to be visiting them next week?     Are you planning to be visiting them next week?     Do you plan to visit them next week?      Will there be any difference in the answers?        I think I will visit them next week.     I will visit them next week.     I am going to visit them next week.     I am visiting them next week.     I am going to be visiting them next week.     I am planning to be visiting them next week.     I plan to visit them next week.      Can I use "planning to" instead of "going to"?  (E.g. "Are you planning to visit them next week? — Yes, I am planning to visit them next week.") Which of these sentences show that the subject of conversation has already been discussed? For example, I talked with a friend of mine about my plans to visit somebody. So my friend is aware of my plans.  And my last question. Which of these seven sentences express that the action will certainly take place? Could the Horcruxes be destroyed with Avada Kedavra? In The Deathly Hallows Hermione says this about destroying Horcruxes:     “It doesn’t have to be a basilisk fang,” said Hermione patiently.   “It has to be something so destructive that the Horcrux can’t repair   itself. Basilisk venom only has one antidote, and it’s incredibly   rare—"      "That’s a problem we’re going to have to solve though, because ripping, smashing, or  crushing a Horcrux won’t do the trick. You’ve got to put it beyond magical repair.”   Mad-Eye Moody from The Goblet of Fire tells us this about Avada Kedavra,     ...there's no countercurse. There's no blocking it.   but also that,      Avada Kedavra's a curse that needs a powerful bit of magic behind it - you could   all get your wands out now and point them at me and say the words, and I doubt   I'd get so much as a nosebleed.    Harry is also seen once attempting to use Crucio on Bellatrix Lestrange in The Order of the Phoenix out of anger at the death of Sirius, but he fails. She tells him,     "You need to mean [Unforgivable Curses], Potter! You need to really want to cause pain - to enjoy it - righteous anger won't hurt me for long - I'll show you how it is done, shall I? I'll give you a lesson -"   Even if Harry and company are not powerful enough to perform the curse themselves, they know several powerful wizards (Kingsley, Lupin, et al.) who could likely perform the curse.  Lastly we know that Voldemort himself destroyed the last bit of his soul that was inside Harry with Avada Kedavra.  Could the Horcruxes be destroyed with Avada Kedavra as well? How to stop Katoolin from crashing Ubuntu? When Ron broke his wand, why didn't he apply for Hogwarts financial aid? How to prove a general matrix invertible given by as below?  How to prove that $A^TA+I$ is always invertible for $\forall A \in \mathbb{R}^{n\times n}$? sometimes when writing mathematical expression with partial derivatives, one needs to write a vertical bar afterwards and write the value at the which the partial derivatives are being computed as subscripts. See for example the bottom post here:    However, the \mid symbol doesn't produce a tall bar that corresponds to the size of the partial derivatives term. Is there a way to have a taller bar?   PS: Some other posts here mention \middle| but this doesn't compile on my computer.  Thanks in advance.... 2 different bibliographies I'm writing my thesis and I would like to make 2 "bibliography" references: The first one would be for the publications I'm in and the second one for external references. I've made one *.bib file right now and it's working but I have no idea how I should work with 2 *.bib files.  Any suggestion will be appreciated. How do I format a Decimal to a programatically controlled number of decimals in c#? How to answer a negative question in English? Q: "Don't you know?"   If I really don't know, how should I respond to this question? Yes or No?  There's a similar question on EL&amp;U, but the answer isn't clear how it works:      Also here on ELU too:      These answers are confusing. I want to know what one word answer I can use. In other words I want to know:   What will native speakers understand if I reply No to this question? What will native speakers understand if I reply Yes to this question? I am using QGIS and I created a vector grid on a crop field in order to cut it into plots. I want to save each grid cell into individual polygon shapefiles automatically.  Here is an example of a vector grid I would like to split into 117 shapefiles:    Eventually, I did it manually with the selection tool and "Save as" but it is really time-consuming when there are more than 100 plots to save.    Is there any way to do it faster and more automatically?  Each plot as an attribute named "Plot" that can discriminate against them (basically being id + 1). It's the attribute used here to label them. double movement in Scrabble Can you resolve a dispute between myself and my girlfriend? She recently won a game with what I think is a double movement (although there's no mention of this in the rule book).  She put one two letters down to make one word, which also scored linked to another letter. But she then added another letter immediately to the left of the finished word, which then extended the second word. I just don't think you can make a second movement like this in scrabble!    My sister placed down W, D and E, the ones that I circled in red. Is she allowed to do that? I told her it was impossible is it?  Can you resolve this for me please? I'm trying to find an alternative to the standard tombstone qed symbol for more informal papers. I initially thought of an empty square with Pub written inside, but what would actually be better would be a small beer mug symbol. (much like the one found in this set of icons )  Unfortunately there doesn't seem to such a symbol in the comprehensive latex symbol list (although many funny symbols can be found there). Has anyone thought about this? Is there any quick-and-dirty solution? Clean install Windows 8.1 or Windows 8 from OEM key What to call the attitude of pursuing something Javascript Array.sort implementation? Which algorithm does the JavaScript Array#sort() function use?  I understand that it can take all manner of arguments and functions to perform different kinds of sorts, I'm simply interested in which algorithm the vanilla sort uses. Right now, I have everything in a partition (except EFI system partition). How can I split the partition into two, one for / and one for /home?   How would you use parted to do that step by step?  How would you use gparted to do that step by step?  How would you use LVM to do that step by step?   One thing I am not sure of is that I can't just shrink the partition and create a second partition on the space that is freed by shrinking, because that doesn't move /home to the new partition.  Thanks.    $ sudo parted -l [sudo] password for t:  Model: ATA TOSHIBA MQ01ABF0 (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:   Number  Start   End    Size   File system  Name                  Flags  1      1049kB  538MB  537MB  fat32        EFI System Partition  boot, esp  2      538MB   500GB  500GB  ext4  $ sudo df -h [sudo] password for t:  Filesystem      Size  Used Avail Use% Mounted on udev            1.7G     0  1.7G   0% /dev tmpfs           340M  1.4M  338M   1% /run /dev/sda2       457G  6.7G  428G   2% / tmpfs           1.7G   27M  1.7G   2% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           1.7G     0  1.7G   0% /sys/fs/cgroup /dev/sda1       511M  6.1M  505M   2% /boot/efi tmpfs           340M   20K  340M   1% /run/user/1000 tmpfs           340M     0  340M   0% /run/user/106 What are the differences between Factor Analysis and Principal Component Analysis? It seems that a number of the statistical packages that I use wrap these two concepts together. However, I'm wondering if there are different assumptions or data 'formalities' that must be true to use one over the other. A real example would be incredibly useful. Picture/Video capture programs What software options are there for taking videos and or pictures within Ubuntu (Much like Apple's Photobooth)?  Please limit one software solution per answer and include key features/description of the software Find $\min(\operatorname{trace}(AA^T))$ for invertible $A_{n\times n}$ For invertible $A_{n\times n}$ find $\min(\operatorname{trace}(AA^T))$  (a) $0$ (b) $1$ (c) $n$ (d) $n^2$  Clearly for $A=I$, it is $n$, and I am unable to get any lower values, but how do I prove it. Proof that there are infinitely many prime numbers starting with a given digit string To prove the following fact: given any sequence of digits in any base, eg 314159265358979323 base 10, there are infinitely many primes that start with these digits,eg when expressed in decimal they start with 314159265358979323. I think using a prime number theorem will be helpful . But I am still not getting a point of how to start the proof.