Page 1 of 1

simple string echo being blank

Posted: Tue Jan 05, 2010 5:18 pm
by angelic_devil
hi for the following code the o/p is blank..plzhelp

Code: Select all

 
<?php
$y="<idiot>";
echo $y;
?>
 
the o/p shud be <idiot>

Re: simple string echo being blank

Posted: Tue Jan 05, 2010 6:14 pm
by flying_circus
angelic_devil wrote:hi for the following code the o/p is blank..plzhelp

Code: Select all

 
<?php
$y="<idiot>";
echo $y;
?>
 
the o/p shud be <idiot>
right click -> view source

Re: simple string echo being blank

Posted: Tue Jan 05, 2010 6:16 pm
by angelic_devil
WAT?? ru joking...i want the string <idiot> to be printed on the screen ...not want to see the source

Re: simple string echo being blank

Posted: Tue Jan 05, 2010 6:35 pm
by flying_circus
angelic_devil wrote:WAT?? ru joking...i want the string <idiot> to be printed on the screen ...not want to see the source

Code: Select all

<?php
  $y = "<idiot>";
  echo htmlentities($y);
?>

Re: simple string echo being blank

Posted: Tue Jan 05, 2010 6:45 pm
by angelic_devil
thank u