I'm trying to complete it with a 360 grid system:
From the database, It is working perfectly on the product of 4 products on the whole, but if there are fewer than 4 products in the category, then the design becomes messy up, because the device has not stopped properly. The problem is that sometimes - There are only 3 or fewer products in the line.
How do any of you accomplish this?
For ($ i = 0; $ I <$ countprod; $ i ++) {$ prevprod = $ products [$ i-1] ['name']; $ Curprod = $ products [$ i] ['name']; If ($ curprod! = $ Prevprod) {echo '& lt; Div class = "grid_12 alpha omega" & gt; & Lt; H2 & gt; $ Products [$ i] ['catname']. '& Lt; / H2 & gt; & Lt; / Div & gt; '; } If ($ i == 0) {echo ' 'Image']; if ($ i% 4 == 3) {echo '
;' (title Sorry about, I did not know what this question is like :))
$ I = 0; $ i & lt; $ countprod; $ i ++) {$ curprod = $ products [$ I] ['name']; if ($ curprod! = $ Prevprod) {If ($ close_div) echo '& lt; / div & gt;'; echo '& lt; div class = "grid_12 alpha omega" & gt; ; & Lt; h2 & gt; $ Products [$ i] ['cat name']. '& Lt; / h2 & gt; & lt; ($ I% 4 == 3) {echo' & lt; div class = "grid_3 alpha" & gt; ; ' $ Close_div = true;} otherwise ($ i% 4 == 3) {echo} '& lt; / div & gt; div class = "grid_3 omega" & gt; $$ close_div = true;} Other {echo & lt; / div & gt; & lt; div class = "grid_3"> $ close_div = true;} $ product [$ i] ['image'] resonate , If ($ i% 4 == 3) {echo ' gt; div class = "clear"> '; $ Close_div = false;} $ Prevprod = $ curprod;}
Popular posts from this blog
I want to use switch-case in my program but the compiler generates an error. How can I use the switch statement with QString ? The compiler gives me this error: The expression of the switch type 'QString' is invalid My code is as follows : boolStopWord (the word QString) {bool flag = false; Switch (word) {case "the": flag = true; break ; "On" case: flag = true; break ; Case "in": flag = true; break ; Case "your": flag = true; break ; Case "near": flag = true; break ; Case "all": flag = true; break ; Case "this": flag = true; break ; } Return flag; } How do I use the switch statement with a Caststring ? You can not use the switch statement in C ++ language with integral or enum types. You can formally enter the square type of object in the switch statement, but this means that the compiler will look for a user-defined conversion to convert it to an integral or enum type.
I'm trying to create a predefined key after checking the manual and I wrote it: Db.execute ("create table" Table 2 (id, integer primary key, somedata integer) "db.execute" (table creation table 2 does not exist (name text, maintain reference (id) ") and found this: sqlite 3. Operation error: near" references ": syntax error Your second ligne is wrong db.execute ("create table if table does not exist 2 (name text, my_id integer, foreign key (my_id) reference Maintenance (ID)) ") as explained
What is a Python equivalent for Ruby's define_method , which is the dynamic generation of class methods will allow? (As can be seen in Wikipedia) Functions are first-class objects in Python and assign them The properties of a class or an example can be a way of doing the same thing as a Wikipedia example: colors = {"black": "000", "red": "F00", "green": "0f0", "yellow": "ff0", "blue": "00f", "magenta": "fff", "cyan": "0ff", "white": " FFF "} Class MyStream (ARR): Pass for Name, Code in colors.iteritems (): def _in_colour ( W code = code): return '& lt; Span style = "color:% s" & gt;% s & lt; / Span & gt; ' % (Code, self) setter (histrive, "in_" + name, _in_ color)
Comments
Post a Comment