I know how to use php-markdown by loading it manually, but decided to install it through pear. Installed with the following commands:
pear channel-discover pear.michelf.com
pear install michelf/MarkdownExtra
>> install ok: channel://pear.michelf.com/MarkdownExtra-1.2.5
The problem is that I have no idea on how to use it when installed from pear and the documentation does not informs anything about it, so I think it might be a pretty dumb question.
Here is how I tried to use it:
if(class_exists('MarkdownExtra_Parser')){
$m = MarkdownExtra_Parser();
$html = $m->transform($string);
}
and:
$html = Markdown($string);
anyone?
When it’s installed OK, it gets installed into the base PEAR directory – which should be in the include path.
will output the two sets of HTML based on the contents of $mdtext.
There are some instructions on http://michelf.com/projects/php-markdown/