overwrite php loop while looping it, then break? -
I was thinking that this code snippet is considered legal:
$ arr = Array 123,456,789,123,456,789); Forex Currency ($ AR $ one) {$ arr = $ a; break; } // print 123 acres $ arr;
It executes, but can I have any disadvantages by using this method?
Update: Here is the real problem
You have an array of database queries ([code> select * from table where code = $ code ] Array ([0 ] = & Gt; Array ([id] = & gt; 1 [code] => 1234567 [member_id] => 7) [1] => Array ([ID] => 5 [ Code] => 1234567 [member_ id] = & gt;) [2] = & gt; Array ([ID] => 67 [code] => 1234567 [member_id] => 43))
If you care about the first (if any) line which is empty member_id (it means the code has not been claimed) lost It's been happening.
How can you go about doing this?
According to the Felix Cling using variables to capture the array of codes and then writing from that line from which you do not want the best solution, what do you offer
In addition, bonus credits: how many differences can you use 32 letters (permission for duplicate characters)? <32> ^ 32) ^ 32) ^ 32 ?? (32) ^ 32 ^ ^ 32
As other people have said, there is no reason to reuse the variable. Is there any reason for this? Why not create a new one?
$ resultId = 0; Foreign currency ($ result as $ line) {if ($ line ["member_id"] == "") {$ resultId = $ row ["id"]; break; }}
But this is a big question - why do not you just do this in SQL? You are already creating a SQL query. To answer your second question, select * from the table where the code = $ code and member_id = zero
?
Wrong in Bitid: Number of permutations with seven characters, each 32 different possibilities = 32 ^ 7.
Comments
Post a Comment