10 PHP Syntax Tutorials

The PHP syntax is based on C, Java, and Perl, so if you’ve used any of those languages PHP will look familiar to you. Creating a PHP file is similar to creating an HTML file. In fact, most PHP files are a mixture of PHP code and HTML.

1. Basic PHP Syntax

A PHP scripting block can be placed anywhere in the document. For maximum compatibility, we recommend that you use the standard form rather than the shorthand form.
Basic-PHP-Syntax-.jpg
Source


2. Alternate PHP Syntax for View Files

If you do not utilize CodeIgniter’s template engine, you’ll be using pure PHP in your View files. To minimize the PHP code in these files, and to make it easier to identify the code blocks it is recommended that you use PHPs alternative syntax for control structures and short tag echo statements. Learn here how.
Alternate-PHP-Syntax-for-View-Files-.jpg
Source


3. GeSHi – Generic Syntax Highlighter

Features:
> Support for a wide range of popular languages
> Easy to add a new language for highlighting
> Highly customizable output formats
GeSHi-Generic-Syntax-Highlighter-.jpg
Source


4. The Syntax of PHP

This page describes the syntax of the PHP programming language based on the definitions of the language in Programming PHP by Rasmus Lerdorf, and Kevin Tatroe, published by O’Reilly Publishing. Since PHP is still a rapidly evolving programming language, the syntax presented here is for PHP 4.
The-Syntax-of-PHP-.jpg
Source


5. Add PHP syntax coloring to XCode

Learn how to add PHP syntax coloring to Xcode.
Add-PHP-syntax-coloring-to-XCode-.jpg
Source


6. PHP Syntax to Access The Filesystem

PHP has the ability to access the filesystem, which in this case applied in making the web. So that users can upload files.
PHP-Syntax-to-Access-The-Filesystem-.jpg
Source


7. PHP syntax: For Loop Basics

The for loop allows iteration a fixed number of times.
PHP-syntax-For-Loop-Basics-.jpg
Source


8. Dwoo Template Syntax

Those are the simplest thing to handle in Dwoo, you just need to know the variable name and you can output it like that: {$name}. So let’s say you have a variable called date, you would output it using {$date}.
Dwoo-Template-Syntax-.jpg
Source


9. Escaping from HTML

When PHP parses a file, it looks for opening and closing tags, which tell PHP to start and stop interpreting the code between them. Parsing in this manner allows PHP to be embedded in all sorts of different documents, as everything outside of a pair of opening and closing tags is ignored by the PHP parser.
Escaping-from-HTML-.jpg
Source


10. MySQL PHP Syntax

This tutorial focuses heavily on using MySQL in a PHP environment.
MySQL-PHP-Syntax-.jpg
Source

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>