?
Solved

Easy Question 2

Posted on 2000-02-09
1
Medium Priority
?
170 Views
Last Modified: 2013-12-25
Help me out here...
I've got a variable $filename which contains some text, let's say:
$filename="test";
Now I want to add to this text the following characters: ".txt" so that I get as result:
$filename="test.txt"

I've tried it with this code:
$filename=$filename+".txt";
print "$filename !!";
but when i run it the variable still hasn't got those extra characters. Am i doing something wrong ?
0
Comment
Question by:oostwijk
1 Comment
 
LVL 1

Accepted Solution

by:
elpmet earned 120 total points
ID: 2506024
Hi, I'm back again  :-)

Try the following:

$filename=$filename . ".txt";

Elpmet
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question