Home > PHP > PHP – Example 0003

PHP – Example 0003

Third Example 0003

<title>Third example</title>

// Third  Example (STRING)
// ————————
$my_string = ‘first string’;
$another_string = “another string”;

echo $my_string;
echo ” <br />”;
echo $another_string;
echo ” <br />”;



In this example, we see the using of string and variable.
$my_string = ‘first string’;
$another_string = “another string”;
we see two ways of using a variable with a single quote ( ) and with a double quote ( ).

echo $my_string;
echo $another_string;
we see the “echo” function to print the variable value.

The output window you will see the following:

first string
another string

Categories: PHP
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: