SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    685
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple Variable Question

    I need to set up some variables like the following:

    $to = 'test@test.net,$tola';

    $subject = 'Timesheet - $usernamesub - $dept - $enddateemail';

    I know you can't put variables in single quotes, but what is the way around that?

  2. #2
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using double quotes, or concatenating the strings by a dot like this:
    $subject = "Timesheet - $usernamesub - $depth - $enddateemail";
    $subject = 'Timesheet - '.$usernamesub.' - '.$depth.' - '.$enddateemail;
    FOR SALE: 1 set of morals, never used, will sell cheap


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •