Parsing BB Code to HTML in custom PHP pages in MyBB

MyBB provides various types of BB code such as [img],,[font] and a lots of BB code but what if you are using MyBB integrated with a different project and you want to use those BB codes in your applications. One of the most difficult situations when you are parsing BB code to PHP in custom pages.

I have the solution for you all, it is very simple and you just need to call the below functions in your custom PHP code and that will enable you to use BB code in your PHP pages.
I have written the PHP code which you will need to copy.

As you can see,in the first two lines we are calling the inbuilt parser present in MyBB.
After that we are setting the option present in parser function and allowing Mycode in MyBB.
Remember not to enable html in parser options as there has been some issues with MyBB using html in posts which might expose your forums to vulnerability.

Hope this helps you all, let me know in case of any issues.