TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

PHP

PHP String Variables

Overview

In this tutorial, we will learn about PHP String variables. We will learn how to define, output, and concatenate strings. A string is a character sequence. In PHP String variables are enclosed either in double quotes or in single quotes.

Syntax

The Syntax to declare a string variable in PHP language
is as follows:

$stringVariable = “The String Value goes here”;

Concatenate Strings

Strings in PHP are concatenated using the dot operator (.)

Example

<?php
$str1 = “Hello “;
$str2 = “World!”;
echo $str1.$str2″;
?>

—

PHP Tutorials

PHP Tutorials on this website:

https://www.testingdocs.com/php-tutorials/

More Information on PHP

https://www.php.net/

Related Posts

Compoer Command line command

PHP /

Install Slim Framework on Windows

php download website

PHP /

Download and Install PHP on Windows

Composer Install Windows

PHP /

Composer Download on Windows

Apache conf file

PHP /

PHP 7 Configuration in Apache Server

testing php linux

PHP /

Testing PHP with Apache Server on Linux

‹ PHP Variables› PHP Arithmetic Operators

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version