타이포그라피(typography) Sample

<?php
/**
 * Typography helper
 *
 * Created on 2011. 11. 18.
 * @author 불의회상 <hoksi2k@hanmail.net>
 * @package helper
 * @subpackage controllers
 * @version 1.0
 */
class Typography_hlp extends CI_Controller {
	function __construct()
	{
		parent::__construct();
		
		$this->load->helper('typography');
	}
	
	function index() {
		$data['string']  = "단락을 p태그로 감쌉니다(단락을 구분하기위해 두번 줄바꿈한것처럼 해줌).\n";
		$data['string'] .= "줄바꿈은 br태그 로 변환합니다. pre 태그가 있는경우는 변환하지않습니다.\n";
		$data['string'] .= "div태그와 같은 블록수준의 레벨개체(level elements)는 단락으로 감싸지지않으며 단지 그 내용이 단락을 포함하고 있다면 그것은 감쌉니다.";
		
		$data['auto_typography'] = auto_typography($data['string']);
		$data['nl2br_except_pre'] = nl2br_except_pre($data['string']);
		
		$this->load->view('typography_hlp_sample', $data);
	}
}
<?php $this->load->view('inc/header')?>

<table class="tablesorter" border="0" cellpadding="0" cellspacing="1">
<thead>
<tr>
  <th style="text-align:center" width="20%">구분</th>
  <th width="80%">결과</th>
</tr>
</thead>
<tr>
	<td>$string</td>
	<td><xmp><?php echo $string?></xmp></td>
</tr>
<tr>
	<td>auto_typography()</td>
	<td><xmp><?php echo $auto_typography?></xmp></td>
</tr>
<tr>
	<td>nl2br_except_pre()</td>
	<td><xmp><?php echo $nl2br_except_pre?></xmp></td>
</tr>
</table>

<?php $this->load->view('inc/footer')?>

© Copyright by hoksi(Page rendered in 0.0087 seconds)