SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Splitting a string into single characters

    Hi Guys

    Hoping you could help me on this one. Whats the best way to split up a string into individual characters (preferably into an array?)

    ie

    hello world

    ->

    $array[0] = h
    $array[1] = e
    .....

    Thanks Guys
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  2. #2
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    219
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $test 'Dan';
    $letters str_split($test); 
    HTH,

    Dan


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
  •