Tutorial on Getting Started with Mustache Template in PHP
In this getting-started tutorial, we will show you how to use the mustache templating system in PHP. The main mustache template is http://mustache.github.io/ And it documentation is linked...
read morePHP: How to find server path of current file
Sometimes you need to find the absolute server path of the current file in order to determine the root location of your PHP application. Provided that your current file is at the root of your...
read moreHow to determine if a string ends with a particular string in PHP?
Unfortunately, there is no built-in PHP function that tests if a “haystack” string ends with a “needle” string. As an concrete example, suppose you want to determine if the...
read morePHP to connect and query from WordPress mysql database
In this tutorial, we will learn how to write PHP to connect to a mysql database and then perform a query. For a newer tutorial, see here also. For the purpose of demonstration, the mysql database...
read moreHow to Handle Magic Quotes in PHP
Continuing from our previous tutorial, our example assumed that your PHP server has magic quotes turned off (which is preferred). Because PHP manual says … “It’s preferred to code...
read moreHow to Use Session Variables in PHP
We continue from the previous tutorial. Here is demo. 4. Now suppose we add a link on the confirmation page to go back to the previous index.php page … 5. When we click on that link,...
read moreThe correct way to post and echo form values
In this tutorial, we will post a form value and echo it back. But taking care to escape the values using htmlspecialchars() in order to prevent cross-site scripting attacks. A demo here shows the...
read moreWhat is the Difference Between PHP echo versus print?
There is not a whole lot of difference between the PHP echo versus print construct, but there are a few. Note that both of them are PHP constructs. They are not functions. Hence, the...
read moreUsing short versus long form of PHP open close tags
PHP code in HTML document is sectioned off by PHP opening and closing tags as shown here… There is the question whether to use the long form as shown above versus using the short form as shown...
read moreAll contents are opinions and are copyrighted and may contain display ads and ad links for which site may receive revenues from.
See Terms of Use and Privacy Policy.