Problem of inverted comma
In my php page I want to use jvascript like this
<script type="text/jvascript">
function deiplay(str)
{
alert(str);
}
<script>
<?php
$string="Soman's ";
echo "<script> deiplay('Company Name: $string' )";
?>
In my program $string value come from database. Then it give jvascript error. I can use Double inverted comma("). Problem is If Double inverted comma in database it will give problem. How can I solve this problem? Please tel me If you know.
|