i'm doing a project in php! the problem is array is not printing properly. Actually im trying to retrieve text data from mysql using php. im able to retrieve the data, but while im printing in the document it is not printing as i want!!
echo "<td><p onclick=alert('".$arr[$t]."'); ><u>VIEW</u></p></td>";
$arr[$t] is text data i retrieved from database.
it should print like this(assuming $arr[$t] has data "this is a paragraph")
but the actual output is like this..
output in CHROME
<td><p onclick="alert('this" is a paragraph'); ><u>VIEW</u></p></td>
output in FIREFOX
<td><p paragraph');="" a="" is="" onclick="alert('this" ><u>VIEW</u></p></td>
i dont know why it's happening.
please help me out with this..
thanks in advance :)