SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: assigning

  1. #1
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    litlle quicky question here
    I want to assing a string o a variable.. simple
    $fdsa="blah";
    but how do i assing it a string and a variable?

    like I thought it would be something like this?

    $fdas = "blah" AND 'variable' AND "more text';

    Im probaly dead wrong

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mean like

    $fdas = 'blah'.$variable.'more text';

    Its called the concatenation operator, and it concatenates two or more strings or vars together.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    What's HTML?
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    1,701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And actually for a simple string like this you could just do this:
    $fdas = "blah $variable more text";
    Ryan Kuhle - A Proud Advisor - Got Questions? Just Ask!
    Get your website started for less than $20! Click Here

  4. #4
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a good tutorial on strings and PHP. I read it after sitepointforums member Philip Olsen posted the link some time ago:

    http://www.zend.com/zend/tut/using-strings.php


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
  •