User Profile

Collapse

Profile Sidebar

Collapse
polturgiest
polturgiest
Last Activity: Jul 9 '07, 03:10 AM
Joined: May 30 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • i cannot find macthing records before using this, bcoz most of my records got many spaces :( .

    solved

    [PHP]
    $var = str_replace(' ', ' ', 'Micheal Owen'); // with multiple spaces
    print $var; // the result

    // when query i used this

    $SQL = 'select name from player where name = \''.str_replace (' ', ' ', $var).'\''; // working its take all the spaces
    ...
    See more | Go to post

    Leave a comment:


  • i've tried this

    [PHP]$var = $_POST['MyInput']; // for example "AH 1902" with 2 spaces
    $tmp = str_replace(" ", "*", $var);
    print "var is : ".$var." ( ".strlen($var). " )";
    print "tmp is : ".$tmp." ( ".strlen($tmp). " )";[/PHP]

    output :
    [HTML]var is : AH 1F02 ( 8 )
    tmp is : AH**1F02 ( 8 )[/HTML]...
    See more | Go to post

    Leave a comment:


  • Multiple spaces become single space when submitting

    hie all

    i got a form

    Code:
    <form name="TEST" method=POST action="test.php">
    
    <input type="text" name="MyInput">
    
    <input type="submit" name="ACTION" value="SAVE">
    
    </form>
    if i input "Welcome ", with a few spaces, i cannot get all the spaces. the $_POST['MyInput']...
    See more | Go to post
No activity results to display
Show More
Working...