Hướng dẫn dùng semicolon php trong PHP
i have code like this :
how can it return html like this :
Big Thanks asked Apr 23, 2016 at 13:37
Japar SJapar S 571 silver badge7 bronze badges 3 Not entirely sure what information you need but here's an overview... You can use both single and double quotes when
or
If you want to echo the quote type used to encapsulate the string, escape it like,
Strings within double quotes will accept a variable inline,
Whereas strings within single quotes need to be concatinated with variables,
Check out http://php.net/manual/en/function.echo.php for full details and examples. answered Apr 23, 2016 at 13:56
SteveSteve 1,64313 silver badges27 bronze badges Since you quoted the string with single quotes, you have to escape them inside the string. Simply add a backslash
Also you can do that in a few other ways like:
Double quotes lets you simply embed a variable instead of concating, but now you have to escape double quotes. answered Apr 23, 2016 at 13:48
Jakub MatczakJakub Matczak 15k5 gold badges48 silver badges61 bronze badges 0 I'd suggest you to write this variable within an opening and closing php tag.
This generates:
answered Apr 23, 2016 at 13:48
Not the answer you're looking for? Browse other questions tagged php or ask your own question. |