Quick PHP Project for PayPal?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 96ukssob
    So Fucking Banananananas
    • Mar 2003
    • 12991

    #1

    Quick PHP Project for PayPal?

    I need something built out pretty quick and annoyed that I just spent the last hour trying to figure it out and cant get it to work.

    What I need is a text box to dump in a bunch of keywords, separated by line breaks.

    When I hit "submit" it will then add find a space " " and replace it with a " +" (space plus sign). As well, it will add a plus sign "+" to the first word; since there is no space before that.

    Here is a sample input:

    banana hammock
    tube sock
    purple people peter eater
    porn

    The output would then be:

    +banana +hammock
    +tube +sock
    +purple +people +peter +eater
    +porn

    Email: Clicky on Me
  • u-Bob
    there's no $$$ in porn
    • Jul 2005
    • 33063

    #2
    I was here

    Comment

    • Kiopa_Matt
      Confirmed User
      • Oct 2007
      • 1448

      #3
      Code:
      $lines = explode("\n", $contents);
      $new_content = implode("\n", array_map('format_line', $lines));
      
      function format_line($line) {
           $line = '+' . preg_replace("/\s/", "\s+", $line);
           return $line;
      }
      Or something like that at least should work.
      Last edited by Kiopa_Matt; 12-10-2010, 09:57 AM.
      xMarkPro -- Ultimate Blog Network Management
      Streamline your marketing operations. Centralize management of domains, pages, Wordpress blogs, sponsors, link codes, media items, sales and traffic statistics, plus more!

      Comment

      • 96ukssob
        So Fucking Banananananas
        • Mar 2003
        • 12991

        #4
        Originally posted by u-Bob
        I was here
        Thanks!! Your the man
        Email: Clicky on Me

        Comment

        • CamsMaster
          Confirmed User
          • Mar 2009
          • 1200

          #5
          Originally posted by Kiopa_Matt
          Code:
          $lines = explode("\n", $contents);
          $new_content = implode("\n", array_map('format_line', $lines));
          
          function format_line($line) {
               $line = '+' . preg_replace("/\s/", "\s+", $line);
               return $line;
          }
          Or something like that at least should work.
          Sex Chat Roulette | Adult Sex Chat | Cam Sites | Mature Cams | Director Web | Videochat | Webmaster | MediaEnterprise

          Comment

          Working...