SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Create an array from a string

    ok i know that with %w (a v n) we can create an array, but i want to know if there is a way to create an array from a string, like this
    var = "something like this"
    %w (var) ovbiosly this doesn wor, is there a way to do this???, or is there a function to conver a string into an array in php i do something like this

    explode("separator", string);

    $var1 = "something like this"
    $var=explode("|",$var1);

    i want to know if there is a way to do this with ruby.

  2. #2
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks bro..


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
  •