Sample> Loadarray Recursive

<?php

// include TPLN
include('TPLN/TPLN.php');

$TPLN = new TPLN;
$TPLN->Open('loadarray_recursive.html'); // you can do  $TPLN->Open();



$tab = array
(
  array
  (
     
'title'=>'blabla0',
     
'subtitle'=>'blabla0-subtitle',
     
'article_content'=>'content0',

    
'comment'=> array
    (
         array
         (
            
'title'=>'blabla1',
            
'comment_content'=>'content_blabla1'
         
),

         array
         (
            
'title'=>'blabla2',
            
'comment_content'=>'content_blabla2'
         
),

         array
         (
            
'title'=>'blabla3',
            
'comment_content'=>'content_blabla3'
         
)
    )
  )
);

$TPLN->loadArrayInBloc('article'$tab);

$TPLN->write();



?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Loadarray Recursive</title>
    <link href="../style.css" rel="stylesheet" type="text/css" />
</head>

<body>


<bloc::article>

    <h1>{title}</h1>
    <h2>{subtitle}</h2>

    <p>{article_content}</p>

    <bloc::comment>
        <hr/>
        <h4>{title}</h4>
        <p>{comment_content}</p>
    </bloc::comment>

</bloc::article>


</body>
</html>