Welcome Guest, Not a member yet? Register   Sign In
Proplem with special characters
#1

Hello, everybody,
I have a problem with the special characters.
I would have to make many entries with an array and there are special characters like this " and ' with it.
If I put this in an input like this, it will be displayed.
Code:
<input type="text" class="form-control" placeholder="" value="&quot;A&quot; Cell Incubator">


But if I use a "str_replace" to help, nothing is displayed.

PHP Code:
<?php
    $suche        
= array("&quot;");
    
$ersetze    = array('"');
    
$text        "&quot;A&quot; Cell Incubator";
    
$texts        "&quot;A&quot; Cell Incubator";
?>
<ul class="">
    <li><h1>Sonderzeichen "</h1>
        <ul class="">
            <li><?php echo str_replace($suche$ersetze$text); ?></br>
                <input type="text" class="form-control" placeholder="" value="<?php echo str_replace($suche$ersetze$text); ?>"></li>
        </ul>
    </li>
</ul> 


My goal is to display the HTML code for special characters in the input.
Reply
#2

Hi,

Try this: https://www.codeigniter.com/user_guide/h...eld-values
Reply




Theme © iAndrew 2016 - Forum software by © MyBB