Quantcast
Channel: PHP Tech World
Viewing all articles
Browse latest Browse all 24

Create new pages dynamically using PHP

$
0
0
Suppose if you have a users data in your database and you stored in array variable $users.

For each user you want create a html page so you can do like this
<?php
// Creating a html page with user name
$fp = fopen( $user.".html", "w" );

// Writing the data to html
// $data is your data which you want to write
fwrite($fp, $data);

// Closing the file
fclose($fp);
?>

Hope this article helpful for you.

Viewing all articles
Browse latest Browse all 24

Trending Articles