Convert html tags to string php -
i have been trying following long time , haven't been able figure out.
i have string in php contains html in follows example:
$var = "<div style="display:inline">how</div> <div style="display:none">are</div> <div style="display:inline">you</div> ?";
and store in string $var2, "howyou?"; basically, i'd render html in php in sense.
how go doing this?
thanks
try use ' instead of " inside string that:
$var = "<div style='display:inline'>how</div> <div style='display:none'>are</div> <div style='display:inline'>you</div> ?";
it must work now
Comments
Post a Comment