Search Results

Search found 2 results on 1 pages for 'simplesimon'.

Page 1/1 | 1 

  • How to split a space separated file?

    - by simplesimon
    Hi I am trying to import this: http://en.wikipedia.org/wiki/List_of_countries_by_continent_%28data_file%29 which is of the format like: AS AF AFG 004 Afghanistan, Islamic Republic of EU AX ALA 248 Åland Islands EU AL ALB 008 Albania, Republic of AF DZ DZA 012 Algeria, People's Democratic Republic of OC AS ASM 016 American Samoa EU AD AND 020 Andorra, Principality of AF AO AGO 024 Angola, Republic of NA AI AIA 660 Anguilla if i do <? explode(" ",$data"); ?> that works fine apart from countries with more than 1 word. how can i split it so i get the first 4 bits of data (the chars/ints) and the 5th bit of data being whatever remains? this is in php thank you

    Read the article

  • ASP Menu driving me insane

    - by simplesimon
    Hi there, I am trying to create a menu using ASP (I have never used ASP before, im a PHP man) using values stored in a database. basically the html layout i want is as such: <ul> <li> <ul class="sub-menu"> <li class="sub-menu-li">Test</li> </ul> </li> </ul> I need to loop around the root menu items rs("AD_Level") which is equal to 0 for root objects, then inside that loop, lop around anything that has the same parent id eg if the current record is AD_Level =0 and AD_Parent=5 then loop around all items with AD_Parent 5 and AD_Level != 0 and insert the values into html and so on and so forth. Please help! I am struggling with a new language and cannot see a way to do this without losing sanity Edit (Extracted from Comment by OP) while not rsAdmin.eof sPar = rsAdmin("ad_parent" if rsAdmin("AD_Level")=0 then while not rsAdmin2.eof if rsAdmin2("AD_Level")<>0 and rsAdmin2("ad_parent")=sPar and rsAdmin2("AD_Sec_Level")=>2 then response.write rsAdmin("AD_Menu") end if rsAdmin2.movenext wend end if '' # if not rsAdmin.eof then sPar=rsAdmin("AD_parent") rsAdmin.movenext wend that is my code

    Read the article

1