SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru godsfshrmn's Avatar
    Join Date
    Mar 2001
    Posts
    671
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Variable Question

    Is there a way to take the value of a variable and turn it into another one?
    Example: $line1 = "hp"; and make that into $hp?
    s c r i p t s f o r y o u . n e t
    ScriptsForYou

  2. #2
    SitePoint Addict
    Join Date
    Sep 2004
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's called a variable variables

    PHP Code:
    $line1 "hp";
      $
    $line1 "something";
      
      echo 
    $hp//prints something 
    http://www.php.net/manual/en/languag...s.variable.php

  3. #3
    SitePoint Guru godsfshrmn's Avatar
    Join Date
    Mar 2001
    Posts
    671
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah thanks much =)
    s c r i p t s f o r y o u . n e t
    ScriptsForYou

  4. #4
    Non-Member
    Join Date
    Nov 2003
    Location
    here
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Isn't that basically the same as pointers in Java/C etc..


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
  •