Re: echo a string that contain <? and <?php
From: haoren (xuehong_sun_at_hotmail.com)
Date: 07/21/04
- Next message: jerrygarciuh: "Changing Object Data in an Array of Objects"
- Previous message: Mudge: "Re: Books on html php"
- In reply to: Michael Fesser: "Re: echo a string that contain <? and <?php"
- Next in thread: Westcoast Sheri: "Re: echo a string that contain <? and <?php"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Jul 2004 19:26:58 -0700
I should have put the question in the context. In fact, the string is
received from user's input to the form of a browser. Thus, echo
htmlspecialchars($str); can solve the problem.
Thanks Michael and all you guys.
haoren
Michael Fesser <netizen@gmx.net> wrote in message news:<9taqf0dum09n6k87mo78nbitl762slf27p@4ax.com>...
> .oO(haoren)
>
> >How can I echo a string that contain <? and <?php?
> >
> >For example,
> >
> >$str="test <? and <?php echo";
> >echo $str;
>
> echo htmlspecialchars($str);
>
> http://www.php.net/htmlspecialchars
>
> Micha
- Next message: jerrygarciuh: "Changing Object Data in an Array of Objects"
- Previous message: Mudge: "Re: Books on html php"
- In reply to: Michael Fesser: "Re: echo a string that contain <? and <?php"
- Next in thread: Westcoast Sheri: "Re: echo a string that contain <? and <?php"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|