BLHTML.org

BLHTML.org / Web Programming / BLHTML / BLHTML Manual / BLHTML funktion list / BLHTML funktion list / DATA /

 
  array 1922 0
Manage list elements with #DATA#
Guidelines for listelement:
  • Listelementet är noll litterat (forsta elementet är 0)
  • Listelement följer Assignment hierarchy with DATA
  • #$arrname[+](0 1 2 3...)# Declare arrayen $arrname där forsta elementet heter 0 and andra 1 osv...
  • #$user[*](0(null)name(Adam)sure(Boll)no(123)...)# Declare arrayen $user där forsta elementet heter 0=null and andra name=Adam osv...
  • #$testarray[-] return=ArrayName# returnerar a list with $testarray surename and save it in variable $ArrayName
Example att declare ett listelement:
// Example 1:
#DATA[test1_array[+]] post=set value(() this is (four) () (six) (in the array) (eight))#

// Example 2:
#
DATA[test1_array[*]] post=set
value(
        0()
        1=this
        2=is
        3(four)
        4()
        5='six'
        6='in the array'
        7="eight"
)         
#

variable:  contents:  
$test1_array[0]=
$test1_array[1]=this
$test1_array[2]=is
$test1_array[3]=four
$test1_array[4]=
$test1_array[5]=six
$test1_array[6]=in the array
$test1_array[7]=eight

Example att plocka ut element:
#SET_CATCH_PAGE#
#DATA[no[+]] post=set value(null one two tree four five six seven eight nine ten)# // Declare the array $no

#DATA[no[3]]#<br> // tree

#DATA[n] post=set value=5# #DATA[no[$n]]#<br> // five

#DATA[eight] post=set value=8#
What is variable $eight? Awnser it's #DATA[eight] array=no#<br><br> // Here it pick the 8 element name from the array $no

#+#DATA[no[#DATA[dropdown] array=no#]]#+# = #$dropdown#<br><br>

Dropdown:<br>
#DATA[dropdown] post=new type=dropdown value($no[+])#<br>

#PLOPP value=Update#

Returns:
tree
five
What is variable $eight? Awnser it's 8

the 8 element name from the array $no #DATA[no[0]]# = null

Dropdown:


More information:
  • Variable handling
  • Array handling
  • #ARRAY#
  • Assignment hierarchy with DATA
  • #DATA#
  • dropdown
  • post=new
  • #IF#
  • SCORE example
  • BLHTML forum  


    apache MySQL PHP No to software patents! BLHTML
    © 2003, 2010 BLHTML
    This page is created with BLHTML in 0.1702 seconds