phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


PHP Operators: String Operator

Tag: operator, String Operator, string   Category: PHP Basic
post: 08 Mar 2008 read: 572


PHP Operators Step By Step Tutorial - Part 12: There are two operator strings, the first is the merger operator with '.' which yielding merger of left and right argument, while the second is the merger with the operator of assignment ('.=') which enhancing argument at the right side to the left argument beside.

Pay attention to the example of using string operator at script as following:

File name: Stringoperator.php


<html>
<head>
<title>String Operator</title>
</head>

<body>
<h1>String Operator</h1>
<pre>
$word1 = "Good";
$word2 = "moorning ,";
$word3 = "sir";
$word4 = $word1.$word2.$word3;
$word1 .= $word2;
</pre>
<?
$word1 = "Good";
$word2 = "moorning ,";
$word3 = "sir.";
$word4 = $word1.$word2.$word3;
printf ("word1 = %s <br />", $word1);
printf ("word2 = %s <br />", $word2);
printf ("word3 = %s <br />", $word3);
printf ("word4 = %s <br />", $word4);
$word1 .= $word2;
printf ("word1 = %s <br />", $word1);
?>
</body>
</html>
php string operator


Series this article:
PHP Operators: Introduction
PHP Operators: Arithmetic Operators
PHP Operators: Assignment Operators
PHP Operators: Assignment Operators Table
PHP Operators: Bitwise Operators
PHP Operators: Relation Operators
PHP Operators: Ternary Operator
PHP Operators: Error Control Operator
PHP Operators: Execution Operator
PHP Operators: Increment or Decrement Operator
php Operators: Logic Operator
PHP Operators: String Operator
PHP Operators: Array Operator
PHP Operators: Object Operator
PHP Operators: Operator Priority
PHP Constants: Introduction

| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting