very simple variable issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rob_Beard
Forum Newbie
Posts: 23
Joined: Sat Oct 12, 2002 11:58 am

very simple variable issue

Post by Rob_Beard »

hey all,

Before you tell me to go read stickys and the manual, i've already done so. I just happen to be very very stupid. so please bear with me.


this is my code:
$path="/home/sites/[rest of path]"
$file2delete = $file2del;
$file2del = $path + $bar;
$test = unlink($file2del);
if ($test)
{
print ("Deleted file");
}
break;

I want to know how i can get $file2del to equal $path + $bar in a string....but this code doesnt work?!?!?

cheers

Rob
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Code: Select all

$var = 'string concatenation ' . 'is fun';
Rob_Beard
Forum Newbie
Posts: 23
Joined: Sat Oct 12, 2002 11:58 am

Post by Rob_Beard »

thankyou!!!!!!!!!!!!!!!!
Post Reply