Jump to content

adding strings


Recommended Posts

I tried searching and couldn't find anything...

My problem is that i have a script that grabs the name of a file from a directory and I'm sending it to notepad. One of the variables contains the path of the file and the other variable contains the file name. My problem is that i want to go about combining these two variables but whenever i try to it returns 0.

Heres how I'm trying to do it:

$var = $folderLocation + $file.

I believe im am trying to combine two strings, but could someone tell me what im doing wrong?

EDIT:

Hahah I figured it out... for anyone looking at this post for help:

Instead of using a + sign you need to use an & sign so the real way to do it would be:

$var = $folderLocation & $file

This will combine the two.

Edited by sumone4life
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...