I am fairly new to PHP. I am trying to get my code to read the content of a Markdown file based on the content of GET attribute "pgid", and then output it. This:
print Parsedown::instance()->text("Testing *Markdown* with **Parsedown**")
results in the output
Testing Markdown with Parsedown
But this:
print (Parsedown::instance()->text(readfile("./".$_GET['pgid'].".md")));
with ?pgid=about
and the content of about.md
being Testing *Markdown* with **Parsedown**
, the output is
Testing *Markdown* with **Parsedown** 39
I am unsure why I can get all of the parts to work separately, but not together.