Thread: addin string

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    10
    Rep Power
    0
    I'm trying to do sommthing that should be very simple but i cant get it to work right.

    im trying to make $var and . and $var into one $mastervar

    Please help
    thanks
    david
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    Well, it's not working because . is used to join strings in PHP. Do this instead:

    $mastervar = (string) $var1 . "." . $var2;

    That should solve your problem, if I understand it correctly.



    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson

Similar Threads

  1. array explode ( string separator, string string [, int limit])
    By beemee_freeserv in forum HTML Programming
    Replies: 4
    Last Post: February 5th, 2004, 11:56 AM
  2. mgetty+sendfax on RH9
    By ayrin in forum Linux Help
    Replies: 0
    Last Post: January 31st, 2004, 03:11 AM
  3. Advice on reversing order of characters within a string?
    By FriscoKid in forum C Programming
    Replies: 5
    Last Post: November 13th, 2003, 09:13 AM
  4. finding max string length if more than 2 elements
    By sri197 in forum XML Programming
    Replies: 1
    Last Post: November 7th, 2003, 07:17 PM
  5. error in returned object
    By davidl in forum Java Help
    Replies: 6
    Last Post: October 9th, 2003, 05:34 PM

IMN logo majestic logo threadwatch logo seochat tools logo