-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTML CSS and Javascript with PHP.php
More file actions
48 lines (42 loc) · 1.06 KB
/
HTML CSS and Javascript with PHP.php
File metadata and controls
48 lines (42 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!-- HTML CSS and Javascript with PHP
<?php
echo "<h1> Testing</h1>";
echo "<input type='checkbox' value='test'/>";
$a = "Happy new year";
echo "<input type='checkbox' value='$a'/>";
?>
-->
<!-- javascript using inside php
echo "<script>alert('Hello');</script>";
-->
<!-- Php inside HTMl
<p><?php echo "hello" ?></p>
-->
<!-- Some example -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
// using html inside php example
echo "<p>Hello</p>";
// using variables
$a = "Welcome to coding pages";
echo "<h1> $a</h1>";
echo "<input type='text' value='$a'/>";
// using css
echo "<h1 style='color:red;'> $a</h1>";
// using javascript
echo "<script>alert('testing');</script>";
?>
<!-- php inside html some example -->
<h1>Php inside html some example</h1>
<p><?php
echo "testing example";
?></p>
</body>
</html>