|
Posted by Martin Jay on 09/28/42 11:49
In message <1149449562.998031.175330@f6g2000cwb.googlegroups.com>,
Kentor <kentor@gmail.com> writes
>hello, im trying to make a little loop, but i cant figure it out... i
>have a string with a bunch of 1s and 0s in it: 110101010101111010101
>... i need to count the number of 1s divide it by 2 and make a table
>with 2 columns and then for every one, depending on its position in the
>string i need to output a word and then go to the next 1 and output a
>dif word....
>
>its amenities, winter activities and summer activities for cottages
>that i store in my db with 1s and 0s when its a 1 the amenitie or
>whatever exists when its a 0 then it doesent exist...
>
>an example of the kind of table that i need is here:
>http://www.chaletsauquebec.com/FicheChalet.aspx?IdChalet=2011
I think this example does what you want.
To see it working:
<http://www.spam-free.org.uk/pages/amenities.php>
To download the file:
<http://www.spam-free.org.uk/pages/amenities.zip>
--
Martin Jay
Phone/SMS: +44 7740 191877
Fax: +44 870 915 2124
Navigation:
[Reply to this message]
|