SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Remove unwanted characters from string

    Hi guys how do I escape the following character from my string? Have tried all sorts of things and no luck
    HTML Code:
     Á
    "Persistence is the path to perfection"

  2. #2
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,889
    Mentioned
    74 Post(s)
    Tagged
    6 Thread(s)
    If and only if you are using PHP then try this:

    PHP Code:
    <?php
        defined
    ('jj') ? NULL define('jj''<br />');
        
        
    $a "Á";
        
    $b"this Á is Á a Á test Á to Á see Á if Á it Á works";
        
    $c" <b style='color:#f00; font-size:large'>new-string</b> ";
        
        echo 
    jj'Before';
        echo 
    jj'$a = '$a;
        echo 
    jj'$b = '$b;
        echo 
    jj'$c = '$c;

        echo 
    jj'After';
        
    $b str_replace$a$c$b );
        echo 
    jj'$a = '$a;
        echo 
    jj'$b = '$b;
        echo 
    jj'$c = '$c;
    die;    
    ?>
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014


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
  •