I'm creating an auto documenter for our APIs. Part of the documentation will be a code example -- pretty much just shows the array of data that should be passed to the API and the curl commands to execute it.
I have this mostly working, but the opening <?php is causing me problems. The best thing I've found is to do
$code_example = "\n<\?php ... ";
I don't have this issue in php 5.5, but our API servers (where this will be running) are on 5.3 at the time being. I don't really like escaping the tag, but it might be the only way I can do it.
Any ideas?
Thanks!