You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@ use LeviZwannah\Php2html\Facades\Html as H;
14
14
15
15
H::div()
16
16
::p()::_id("p1")
17
-
::text("Hello PHP2HTML From Paragraph")
18
-
::b()::text("A Bold Text")::b(1)
17
+
::__text("Hello PHP2HTML From Paragraph")
18
+
::b()::__text("A Bold Text")::b(1)
19
19
::p(1)
20
20
::div(1)
21
21
@@ -28,16 +28,16 @@ H::div()
28
28
## HTML Attributes
29
29
Use underscore(`_`) before the name of the function to tell the library
30
30
that it is an attribute. The argument passed to the function is the attribute's value. For example, `_id("p1")` generates `id="p1"`.
31
-
> Note: Everything is possible. `_data_phone("num")` will generate and attribute `data-phone="num"`. You can write anything, and it will be converted to markup. The library makes to presumptions of what you will write.
31
+
> Note: Everything is possible. `_data_phone("num")` will generate an attribute `data-phone="num"`. You can write anything, and it will be converted to markup. The library makes no presumptions of what you will write.
32
32
33
33
### HTML Attributes with dash(-)
34
34
For attributes that contains dash(-) in their names, replace all dashes with underscores(_). For example, `http-equiv="X-UA-Compatible"` will be `::_http_equiv("X-UA-Compatible")`
35
35
36
36
## HTML Element
37
37
Any name without an `_` will be treated as an HTML element. This means, you can even create your own HTML elements. There is no limit. For example
38
-
`::random()::_id("random1")::text("A Text here")::random(1);` will generate an html markup: `<random id="random1">A Text here</random>`.
38
+
`::random()::_id("random1")::__text("A Text here")::random(1);` will generate an html markup: `<random id="random1">A Text here</random>`.
39
39
40
-
To close a previously opened tag, pass 1 as the argument to the open tag's function. For example, `::p()::text("Hello")::p(1)`. Notice the `::p(1)`.
40
+
To close a previously opened tag, pass 1 as the argument to the open tag's function. For example, `::p()::__text("Hello")::p(1)`. Notice the `::p(1)`.
41
41
42
42
## The __text() Function
43
43
Use this function to put text/markup/code/string between opening and closing tags.
@@ -47,7 +47,7 @@ Adds the famous `<!DOCTYPE html>` to your markup.
47
47
48
48
## The __end() function
49
49
Prints the html markup and empties the buffer. All unclosed HTML tags will be closed.
50
-
> Warning: Call this at the end of the file. Otherwise, use __pause() if your want to run a php code in between markup generation.
50
+
> Warning: Call this at the end of the file. Otherwise, use __pause() if you want to run a php code in between markup generation.
51
51
52
52
## The __pause() function
53
53
Prints out the current generated markup without closing opened tags. This allows you to run a php code in between markup generation. For example,
0 commit comments