PHP variable problem with peliculas [duplicate]

2

I'm bringing this variable from the mysql database into a text input, but the result I'm not able to show because of the peliculas.

$cota = '946.9"1968/1975" AMA Ant';

echo '<input type="text"  value="'.$cota.'" />';

result: 946.9

    
asked by anonymous 23.02.2018 / 13:23

2 answers

3

Do this:

<?php

$cota = '946.9"1968/1975" AMA Ant';

echo "<input type='text'  value='" . $cota . "'/>";
    
23.02.2018 / 13:37
2

Basically use htmlentities :

<?php

$cota = '946.9"1968/1975" AMA Ant';

echo '<input type="text"  value="'.htmlentities($cota, ENT_QUOTES).'" />';

htmlentities

    
23.02.2018 / 13:56