Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //xml parser
- $xml = simplexml_load_file("mahasiswa.xml") or die ("Error Gagal") ; ?>
- <html>
- <head>
- <link href='https://fonts.googleapis.com/css?family=Dekko' rel='stylesheet'>
- <style>
- body {
- font-family: 'Dekko';
- font-size: 22px;
- }
- </style>
- <title>
- Data Mahasiswa
- </title>
- <head/>
- <body>
- <h1>
- <marquee> Semua Mahasiswa <marquee/>
- </h1>
- <?php foreach ( $xml -> children() as $mahasiswa ) { ?>
- <b>NIM : <?php echo $mahasiswa["nim"];?> </b></br>
- NAMA : <?php echo $mahasiswa->nama;?> </br>
- ALAMAT : <?php echo $mahasiswa->alamat;?> </br></br>
- <?php } ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement