Return to Snippet

Revision: 12492
at March 17, 2009 10:53 by 1man


Initial Code
/* Longhand version of YAML */
$house = array(
  'family' => array(
    'name'     => 'Doe',
    'parents'  => array('John', 'Jane'),
    'children' => array('Paul', 'Mark', 'Simone')
  ),
  'address' => array(
    'number'   => 34,
    'street'   => 'Main Street',
    'city'     => 'Nowheretown',
    'zipcode'  => '12345'
  ) 
);

/* Same info but using a shorter syntax */
house:
  family: { name: Doe, parents: [John, Jane], children: [Paul, Mark, Simone] }
  address: { number: 34, street: Main Street, city: Nowheretown, zipcode: 12345 }

Initial URL

                                

Initial Description
Simple markup example in YAML.

Initial Title
Example of YAML Markup

Initial Tags
data

Initial Language
Other