Here's a video how is it?
Any problems?

Edited by peter_budo: Keep It Spam-Free - Do not mention, plug or refer to any product, service, or website you are affiliated with

7 Years
Discussion Span
Last Post by mschroeder

Your use of quotes is incorrect. In php anything wrapped in quotes is a string. If you put a number in quotes single or double it is considered a string. If you specifically want something to be a number, do not wrap it in quotes.

$a = 5;
$b = '5';

var_dump($a); //integer
var_dump($b); //string

When working with php you have two options for quoting strings, single and double quotes.
With double quotes, php will parse any variables included within the string.

$color = "blue";
echo "The sky is $color."; //The sky is blue.

With single quotes, php will not parse any variables included within the string.

$color = 'blue';
echo 'The sky is $color.'; //The sky is $color.
echo 'The sky is '.$color.'.'; //The sky is blue.

There is a slight performance gain, at a very micro level, to using single quotes over double quotes because the interpreter does not have to look for variables. But, the trade-off is you have to use concatenation to handle variables.

Also just a pet peeve, php does not require you to close your php tags. In fact with files that only contain php it is suggested you omit the closing tag to prevent any issues with blank lines following the closing tag.

Votes + Comments
Brief, clear examples. Great answer explaining the use of quotes.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.