Results 1 to 2 of 2

Thread: sscanf and spaces

  1. #1

    Thread Starter
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772

    sscanf and spaces

    This is what I am trying to do:
    PHP Code:
    sscanf($str"%s|%s"$part1$part2); 
    $str is something like "Hello, this is a string with white space in it.|Second half with white space." How can I get both $part1 and $part2 to include all the spaces?
    Alcohol & calculus don't mix.
    Never drink & derive.

  2. #2
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    you have to have a %s for each and every word if you do it that way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width