Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to use php to print inside html

<?php
$array = array(1, 2, 3, 4);
?>

<table>
<thead><tr><th>Number</th></tr></thead>
<tbody>
<?php foreach ($array as $num) : ?>
<tr><td><?= htmlspecialchars($num) ?></td></tr>
<?php endforeach ?>
</tbody>
</table>
Comment

php print html code

<?php 
    $name = "GeeksforGeeks";
    echo "<h1>Hello User, </h1> <p>Welcome to {$name}</p>";
?>
Comment

PREVIOUS NEXT
Code Example
Php :: laravel show method 
Php :: submit form and show results on same page without refresh 
Php :: doctrine orm refresh 
Php :: checkout 
Php :: twig render to string 
Php :: laravel use npm package 
Php :: php variable 
Php :: check if second array has all the values from the first element php 
Php :: date subtraction php 
Php :: download file on client from server url php 
Php :: connect an if statement to an input php 
Php :: how to migrate new column without empty the table in laravel 
Php :: php custom error log 
Php :: Detect Mobile Platform On Php 
Php :: avatar generator laravel 
Php :: create laravel migration 
Php :: laravel sanctum authentication 
Php :: how to make primary key and foreign key in phpmyadmin 
Php :: laravel eloquent difference create and insert 
Php :: get data from stdclass object php 
Php :: oop php 
Php :: attach one or multiple files laravel mail 
Php :: redirect to codeigniter 4 
Php :: oop in php 
Php :: send email php smtp 
Php :: php code generator 
Php :: generate shortcode wordpress plugin 
Php :: php convert dbf to mysql 
Php :: cookie phpsessid will be soon treated as cross-site cookie against 
Php :: Remove Version from CSS and JS 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =