I Hate Php PLR Ebook

Product Price: $5.95
SKU: 21494
Quantity:


Sample Content Preview

Covering ECHO, STRING, DATE, VARIABLES, INCLUDE, REQURE, and HEADER

Before we get into learning how to use PHP, we need to briefly explore what PHP is…but I’m not going to go into some long drawn out history of PHP and why it’s here. Also, it is good to be familiar with HTML before you proceed, as you will need to be able to copy and paste code in web pages.

In the world of the wide web, there are two general types of coding languages: “Server side” and “Client side”. This means that one type is run, or interpreted, on the web server itself, and the other is run in your web browser.

PHP is a Server side language. All of the processing is done on the web server itself, and the result is delivered to your web browser as HTML (which, by the way, is a Client side language). Your web server must also have PHP installed in order for it to work! Most web hosting providers have PHP installed, so if you are in doubt, simply ask them.

Now, Let’s Code!

We’re going to tackle the basics to start with. Getting PHP to write things to the web browser, what variables are and how to use them…examples you can use in just about every web page you create.

Let’s start with the most basic one.

The PHP Echo command
We’re going to tell PHP to output something to the screen. Keep in mind that PHP can be used in conjunction with HTML, but we are not showing the code in this example, to keep it simple:

(I hate the “Hello World” sample that every other book in the world uses, so I’m using “Creamy Bagels” instead.)

Let’s dissect the command example bit by bit, shall we? It helps to do this when you are looking at a LOT of PHP code…because, trust me, it can look like a jumbled blurry mess sometimes if you don’t take it piece by piece! Next page, please, if you will…

– tells the webserver, “OK, I’m done with PHP for now. Back to regular HTML”.

Pretty simple when you look at it that way, yes?

“OK, that’s cool..but what if I want to see quotes on my screen?”

This can be done by “escaping” the PHP code for what you want to show up in quotes. Let’s use the example from above…


If you wanted to see quotes around Creamy Bagels, you would use the following code instead:


Using \” tells PHP that you want a quotation mark to appear. Remember this – we’re going to use it later!

Pull some Strings…

In PHP, as a general rule, a String is any line of text contained within quotation marks. You can use either double quotation marks (“) or single quotation marks also known as apostrophes (‘) in a string. Strings could be considered the building blocks of PHP, considering most all data is going to come from what’s in a string.


When using single quotes, you need to “escape” the apostrophe with the slash (just like you would with double quotation marks) if you wish to display it in the output text…


Special commands within strings…

There are some “secret commands” you can use within strings to manipulate the output text:
\n: makes a new line
\r: a carriage return
\t: a tab
\$: shows a dollar sign – remember PHP will be looking for a variable if you want to display a dollar sign and don’t use a slash…and throw an ugly error!

Using Variables

A Variable in PHP, simply put, is one thing that means another thing or things – a “container” if you will. It can represent text, numbers, calculations, and more.

Variables are quite powerful, and if you mess ‘em up, they’ll come get you in the middle of the night.

Declaring a variable is easy. No spaces in the variable name, please – PHP doesn’t like that…


Now before you go off saying “What the heck would I need THAT for?”, remember that variables are very useful…especially if you are PHP Include-ing other files (Like the foreshadowing there? Do ya?)

Real World Usage For Variables

Here’s an example of how you can use a variable in the real world: show the current date on your website.

This example sets the date command as a variable called “$today”, and uses echo to display it on the screen.

And now, for a quick tangent…

More about the “DATE” command – it is very versatile and flexible – see the guide below to use it to it’s potential!

Other Details

- 1 Ebook (DOC), 52 Pages
- 1 Ecover (JPG)
- Year Released/Circulated: 2008
- File Size: 293 KB

License Details:

[No] Includes Sales Page
[Yes] Can be given away
[Yes] Can be packaged
[Yes] Can be offered as a bonus
[Yes] Can Be Edited Completely and Your Name Put on it
[Yes] Can be used as web content
[Yes] Can be broken down into articles
[Yes] Can be added to paid membership sites
[Yes] Can sell this product
[Yes] Can be offered through auction sites.
[Yes] Can sell Resale Rights
[Yes] Can sell Master Resale Rights
[No] Can sell Private Label Rights
Copyright © ExclusiveNiches.com PLR Store. All rights reserved worldwide.