how to manipulate text variable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • aprim

    how to manipulate text variable

    Hi,
    I have a text variable $var1 = "abcdef"
    how I can make $var2= "abc" and $var3 ="def" using caracter count
    like mid$(var,x,y) in visual basic ?

    thanks
  • Steve

    #2
    Re: how to manipulate text variable



    ---
    Steve

    Comment

    • Ken Robinson

      #3
      Re: how to manipulate text variable


      aprim wrote:[color=blue]
      > Hi,
      > I have a text variable $var1 = "abcdef"
      > how I can make $var2= "abc" and $var3 ="def" using caracter count
      > like mid$(var,x,y) in visual basic ?[/color]

      Look at the function substr(). Read
      <http://www.php.net/manual/en/function.substr .php>

      Ken

      Comment

      Working...