PHP Markdown
, (*1)
, (*2)
PHP Markdown Converter
- Headings
-
Italics
- Bold
- Strike Through
- Links
- Images
-
Lists
- Block Quotes
- Tables
Markdown is a PHP library for converting markdown to markup. It is a useful tool
for creating documentation on a web page. For example, if your website contains
a blog, wiki pages, any sort of editing from users you could allow them to
style their documents using markdown., (*3)
Headings
# <h1>, (*4)
## <h2>, (*5)
### <h3>, (*6)
#### <h4>, (*7)
##### <h5>, (*8)
## This is a Heading Two will produce the following markup <h2>This is a Heading Two</h2>, (*9)
Italics
__text__, (*10)
Wrap text in __ to make it italics, (*11)
__this text is italic__ will produce the following markup <em>this text is italic</em>, (*12)
Bold
**text**, (*13)
Wrap text in ** to make it bold, (*14)
**this text is bold** will produce the following markup <strong>this text is bold</strong>, (*15)
Links
[Text](Hyperlink), (*16)
Create links by inserting the link text in square brackets followed by the hyperlink in normal brackets, (*17)
Google, (*18)
[Google](https://google.ie) will product the following markup <a href="https://gooogle.ie" target="_blank">Google</a>, (*19)
Images
, (*20)
Create images by inserting the alternate text in square brackets followed by the link to the image in normal brackets, (*21)
, (*22)
 will produce the following markup <img src="https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png" alt="Git Logo" />, (*23)
Code
Create inline code elements by surrounding elements in ```var x;```;, (*24)
```var x;```, (*25)
produces the following markup, (*26)
<code>var x;</code>
if you need to span multiple lines use 4 back-ticks instead of three, and make sure to have one line break inside the back-ticks, (*27)
Lists
Unordered Lists
List
- item one
- item two
- item three
will product the following markup, (*28)
<ul>
<li>item one</li>
<li>item two</li>
<li>item three</li>
</ul>
Ordered Lists
List
1. item one
2. item two
3. item three
will product the following markup, (*29)
<ol>
<li>item one</li>
<li>item two</li>
<li>item three</li>
</ol>
Block Quotes
> this is a block quote
will product the following markup, (*30)
<blockquote> this is a block quote</blockquote>
Tables
Tables can now be created by using the bar character. Use the | character to outline your table and it's columns, (*31)
|Heading One|Heading Two|Heading Three|
|Row1Col1|Row1Col2|Row1Col2|
|Row2Col1|Row2Col2|Row2Col2|
|Row3Col1|Row3Col2|Row3Col2|
produces a HTML table like:, (*32)
<table border="border">
<thead>
<th>heading one</th>
<th>heading two</th>
<th>heading three</th>
</thead>
<tbody>
<tr>
<td>row1Col1</td><td>row1Col2</td><td>row1Col3</td>
</tr>
<tr>
<td>row2Col1</td><td>row2Col2</td><td>row2Col3</td>
</tr>
<tr>
<td>row3Col1</td><td>row3 col2</td><td>row3Col3</td>
</tr>
</tbody>
</table>