PHP Variables

14 Nov

Variables are “containers” for storing information.

Do You Remember Algebra From School?

Do you remember algebra from school? x=5, y=6, z=x+y

Do you remember that a letter (like x) could be used to hold a value (like 5), and that you could use the information above to calculate the value of z to be 11?

These letters are called variables, and variables can be used to hold values (x=5) or expressions (z=x+y).

PHP Variables

As with algebra, PHP variables are used to hold values or expressions.

A variable can have a short name, like x, or a more descriptive name, like carName.

Rules for PHP variable names:

  • Variables in PHP starts with a $ sign, followed by the name of the variable
  • The variable name must begin with a letter or the underscore character
  • A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
  • A variable name should not contain spaces
  • Variable names are case sensitive (y and Y are two different variables)

Creating (Declaring) PHP Variables

PHP has no command for declaring a variable.

A variable is created the moment you first assign a value to it:


After the execution of the statement above, the variable myCar will hold the value Volvo.

Tip: If you want to create a variable without assigning it a value, then you assign it the value of null.

Let’s create a variable containing a string, and a variable containing a number:

$txt=”Hello World!”;

Note: When you assign a text value to a variable, put quotes around the value.

PHP is a Loosely Typed Language

In PHP, a variable does not need to be declared before adding a value to it.

In the example above, notice that we did not have to tell PHP which data type the variable is.

PHP automatically converts the variable to the correct data type, depending on its value.

In a strongly typed programming language, you have to declare (define) the type and name of the variable before using it.

PHP Variable Scope

The scope of a variable is the portion of the script in which the variable can be referenced.

PHP has four different variable scopes:

  • local
  • global
  • static
  • parameter

Local Scope

A variable declared within a PHP function is local and can only be accessed within that function. (the variable has local scope):

$a = 5; // global scope

function myTest()
echo $a; // local scope


The script above will not produce any output because the echo statement refers to the local scope variable $a, which has not been assigned a value within this scope.

You can have local variables with the same name in different functions, because local variables are only recognized by the function in which they are declared.

Local variables are deleted as soon as the function is completed.

Global Scope

Global scope refers to any variable that is defined outside of any function.

Global variables can be accessed from any part of the script that is not inside a function.

To access a global variable from within a function, use the global keyword:

$a = 5;
$b = 10;

function myTest()
global $a, $b;
$b = $a + $b;

echo $b;

The script above will output 15.

PHP also stores all global variables in an array called $GLOBALS[index]. Its index is the name of the variable. This array is also accessible from within functions and can be used to update global variables directly.

The example above can be rewritten as this:

$a = 5;
$b = 10;

function myTest()
$GLOBALS[‘b’] = $GLOBALS[‘a’] + $GLOBALS[‘b’];

echo $b;


Static Scope

When a function is completed, all of its variables are normally deleted. However, sometimes you want a local variable to not be deleted.

To do this, use the static keyword when you first declare the variable:

static $rememberMe;

Then, each time the function is called, that variable will still have the information it contained from the last time the function was called.

Note: The variable is still local to the function.


A parameter is a local variable whose value is passed to the function by the calling code.

Parameters are declared in a parameter list as part of the function declaration:

function myTest($para1,$para2,…)
// function code

Parameters are also called arguments. We will discuss them in more detail when we talk about functions.

Bodybuilding Supplement Information

25 Aug

This distinctive body building supplement is beyond any doubt the breakthrough inside the scientific growth of the figure. The inclusion involving Bromalain has additionally discovered that the supermolecule ar completely absorbed by method of the figure. At constant time, the add-on of aminogen makes bound that the completely free types of amino acids which will be derived from healthier food ar sometimes liberated within the alimentary tract of the figure. Use of this supplement is likewise numerous and incalculable uses for flash in varied approaches.

These supplements may be used even through beginner body building contractors. So, if you want to envision final results quick, each male and feminine bodybuilders ought to appraise taking body building supplements which will facilitate them read results on at the fastest precious time doable. The method during which work is thru aiding the body, particularly your own muscles, reach it’s full future so as for Associate in Nursingyone to physical exercise in an exigent level. These ar the main benefits that interests most people seeking to accumulate power and firmness their body as a results of physical exertion.

Here at gymnasium King we tend to currently have over 100 brands with physical exertion supplements and pro-hormones inside you to settle on from. Like brands that several folks keep a gentle stock for embody, Musclemeds, Pushed Sports, I Force and LG Sciences, as a result of each versions give you with the performance that you simply ought to get the foremost out of your physical exercise.

Coenzyme Q-10 is yet one more physical exertion supplement which will be used even as one inhibitor. it’s sometimes smart for vessel health and hindrance of gum malady.

A final issue to ponder before start line a supplement methodology to not proceed insane in conjunction with take quite an few supplements at just the once. Applying supplements bit by bit and additionally transferral all of them in step by step can assist you superior choose the simplest method effective any person supplement is typically. Otherwise, by subtracting fifteen differing kinds of supplements and ar having gains, you’ll not apprehend which regularly of these solutions is that the most helpful.

The gas supplements physical exertion supplement is not any secret tool, and lots of positively not any flash throughout the pan item, it’s rather a longtime, tried and tested supplement that’s utilized by persons for several years having wonderful advantages inside their schooling programs, shouldn’t you provide gas a strive, primarily think about it’s usually a present supplement that will assist you come through a human goals whereas understanding.

To supplement you are not to supplement – thatrrrs the important question on further bodybuilder’s lips than antecedently. ar they protected? have you ever ever questioned what works and specifically what doesn’t?

Including I according, supermolecule supplements aren’t essential. however finding voluminous supermolecule is! supermolecule supplements simply assist you in obtaining enough of it, throughout your busy evening.

This is the highest rated physical exertion supplement that was medically researched additionally to was which may improve performance. Its all-natural that alter it to be found in an exceedingly smart several food as well as salmon, tuna fish, herring, beside beef.

There ar voluminous selections the place you’ll be able to get dietary supplements to induce physical exertion. yet, important issue is actually finding an area to get the bottom priced nonetheless wonderful physical exertion supplements. sooner than subsidence for any low value complement, turn out that you’ve got got obtained exhaustive study to determine the merchandise quality.

See more about best bodybuilding supplements

Steven Tyler Plastic Surgery – any thoughts about this?

1 Aug

Steven Tyler was born within the late 1948. he’s known round the world as very good musician. The Aerosmith band conquered million hearts of listeners.
Tons of made and famous individuals wish to remain young and delightful. cosmetic surgery may be a good way to archive this. If you had millions in your back account, why to not throw few dozen thousands to keep up your look. Steve Tyler is among them. Plastic surgeries appear to be the best thanks to battle natural aging method. Steven Tyler lied below the scalper 0.5 a dozen times (could be even more). Let’s get deeper into Steven Tyler cosmetic surgery


The terribly initial surgery concerned a lot of Botox. this kind of surgery remains one in all the foremost common round the famous individuals. Why? Botex will simply build your face look younger and fresher. Steve is seventy years recent currently, however undoubtedly wanting sort of a middle age man, 50 at most.
Steven Tyler cosmetic surgery utterly modified his face. And judging from the press, fans appear to be digging Tyler’s new appearance. a noteworthy distinction between the recent Steven Tyler and also the new one.
Steven additionally had his lips injected with silicon, as as a result of this, his lips look wider and juicer. Once he was asked regarding being below the scalper, and Tyler admitted that Botox modified him.

n addition to the current, another Steven Tyler cosmetic surgery happened. now it had been throat surgery. Oh, besides that there are some rumors that Tyler had nose job furthermore.

However, if we glance at his photos, we tend to might undoubtedly build few points: apparently he appearance some way younger and seventy years, his noise appearance higher and his skin appearance smoother, however i’m undecided if he’s happy with all the surgeries normally.
Let’s take an honest verify few photos of Steven Tyler cosmetic implants



Lil Kim’s Plastic Surgery Gone Wrong!

1 Aug

Kimberly Jones aka Lil Kim ought to be the poster kid for “celebrity unhealthy cosmetic surgery.”  Her cosmetic surgery could be a total transformation from lady adjoining to merely plain scary.

The 37-year-old rapper has done it all- nose job, boob job and that we have lost count of the injections and different procedures to the face.


Even though she will be able to rap, she is a lot of in style for her unhealthy cosmetic surgery. The doctor who did her cosmetic surgery ought to definitely provide her a refund.

She extremely looked fine till she went below the knife.

Carrot Top Steroids True or Not

31 Jul

Carrot Top anabolic Steroids Rumors are Proved False!

Carrot prime steroids rumors are flying round the web at lightweight speed recently. the reality is that Carrot prime didn’t use steroids per-say, instead Carrot prime used legal supplements nearly as powerful as steroids while not the side-effects.


Looking at the image one could jump to the conclusion that Carrot prime has steroids surging through his blood, however, the veins or vascularity is caused by high intake of creatine monohydrate and not steroids. Carrot prime has stated repeatedly that he uses the Optimum 100% Whey Protein also as Muscletech Cell-Tech Creatine combine as his solely 2 supplements.

We reviewed Carrot prime’s coaching photos dating from 2000 to 2009 and that we should agree that Carrot Top steroids rumors are totally false. See an individual on steroids encompasses a onerous time maintaining a stable muscle mass because the body desires to urge larger and greater. If Carrot prime were on steroids he’d be abundant larger and would be showing effects of steroid use across nine years. Instead, Carrot prime shows no signs of steroid abuse like “bitch tits” or body acne, the 2 most visible signs he could have used steroids, not there at all!

So there you’ve got it, don’t jump to the conclusion a bloke is on steroids when very he’s simply using off the shelf Protein Powder and Creatine Drinks, maybe the people that started the Carrot prime steroids rumors are simply jealous. That’s my bet!

Hell, imagine what Carrot prime would appear as if if he used BSN No Xplode, a legal and safe creatine supplement that packs on regarding twenty lbs of lean muscle in four weeks!

Examples of bad plastic surgery

30 Jul



A surgeon will have all the talents within the world, however a messed-up patient will originate the scariest travesties upon themselves. we tend to all comprehend Michael Jackson, however he isn’t alone. Take a glance at a number of these videos below to examine what happens after you simply cannot say “no” to the plastic surgeon

Jocelyne Wildenstein

Don’t be fooled by the bleached hair and tiny dog. this is often not Paris Hilton (yet). it is the Swiss Miss, or rather, Swiss Mastodon: Jocelyne Wildenstein. a couple of years ago, her husband started having an affair with a young Russian model. To win him back, Jocelyne sought the assistance of a plastic surgeon to assist her seem like her husband’s favorite animal: a lion (true story). unusually enough, he still left her…
Amanda Lepore
A pretty distinguished transexual known for her bizarre countenance. She works at a department store makeup counter in NYC and has appeared in ads (for Swatch & M.A.C. cosmetics) and has even appeared in movies (like “Party Monster”). She’s launched 2 perfumes, “Lemore” and “Happy Hooker”, and is prepared to launch her third: “Virgin Juice”. Camp, camp, camp.

Jackie Stallone

Yes, i do know I ought to provide her a prospect as a result of she’s one hundred, but really, no matter happened to growing recent gracefully? Jackie, the girl who each birthed Sylvester and commenced GLOW (Gorgeous girls of Wrestling), suffers from the worst case of “trout pout” I’ve ever seen.

I think she conjointly had her own psychic hotline at some purpose, however her face may be simply suggesting that (why are psychics invariably thus weird looking?!).
LaToya Jackson
While cosmetic surgery abuse tends to run during this family, let’s not forget LaToya Jackson, who rivals her youngest brother in ability to create an entire ass out of oneself. Her skin is clearly bleached, however the foremost disconcerting facet of her face is her nose. Where is it? I solely see nostrils. as a result of that, her eyes conjointly appear to be they’ve drifted aloof from one another, towards her ears. She’s divorced her abusive ex-husband and needs to start out anew, thus i might counsel anew nose.

Priscilla Presley

This used to be a fairly lady. Seriously.

I’m unsure what went wrong here, except that she in all probability created the error of obtaining a surgeon referral from Amanda Lepore. Her mouth and cheeks look completely bizarre.

Liza Minnelli
She does not really look too dangerous, though it’s obvious from her Joker smile that she’s had some work worn out that space. She conjointly appearance perpetually surprised–maybe a foul facelift? however during this 2006 interview with Larry King, she’s fully hammered and does not even appear to worry.

More examples of bad surgerys

Bruce Jenner Plastic Surgery

29 Jul

Bruce Jenner, winner of the 1976 Summer Olympics decathlon, recently got additional cosmetic surgery to correct some less-than-stellar surgery from twenty five years ago, and honestly the results don’t look a lot of totally different.

Jenner, 58, is currently best known for being the stepdad of the zaftig-bootylicious Kim Kardashian and her siblings on “Keeping up with the Kardashians,” and his new face was showcased on the season finale this might. He has faced windstorms of media scrutiny and scorn for the botched face elevate and nose job he says he got as a result of he was “was simply researching a nasty time.” when his second divorce left him broke and living in shabby living quarters, Jenner apparently turned to the knife to alleviate a number of the strain and disappointments in his life. sadly, that move solely brought Jenner additional pain.

After obtaining the support from his family, Jenner set it absolutely was time to travel back beneath the knife to correct a number of the problems that created some claim he looked “not quite human.” largely the matter concerned his too-small nose and face that looked pulled tight in all the incorrect placed. His newest new face truly will look additional like photos of Bruce when he was young, and people his nose still appearance alittle slim, it’s like Bruce picked a far better surgeon this point around.

Below may be a photo montage of Bruce’s several faces.