tst - PHP Online
Form of PHP Sandbox
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of tst.php
- <?php<!DOCTYPE html>
- <html>
- <head>
- <title>Athletic Brand</title>
- <link rel="stylesheet" type="text/css" href="style.css">
- </head>
- <body>
- <header>
- <h1>Athletic Brand</h1>
- <nav>
- <ul>
- <?php
- $pages = array('Home', 'Shop', 'About', 'Contact');
- foreach($pages as $page) {
- echo '<li><a href="#">'.$page.'</a></li>';
- }
- ?>
- </ul>
- </nav>
- </header>
- <main>
- <h2>Welcome to Athletic Brand</h2>
- <p>We offer a wide range of high-quality athletic apparel and equipment for all your sporting needs. Browse our selection of gear for running, basketball, soccer, and more.</p>
- <div class="featured-products">
- <h3>Featured Products:</h3>
- <?php
- $products = array(
- array('Running Shoes', 'running-shoes.jpg', 'Our running shoes are designed for comfort and performance, with features like breathable mesh uppers and responsive cushioning.'),
- array('Basketball Jersey', 'basketball-jersey.jpg', 'Represent your team in style with our high-quality basketball jerseys. Made with moisture-wicking fabric to keep you cool and dry.'),
- array('Soccer Ball', 'soccer-ball.jpg', 'Our soccer balls are made with durable materials and a balanced construction for a true, consistent flight.')
- );
- foreach($products as $product) {
- echo '<div class="product">';
- echo '<img src="'.$product[1].'" alt="'.$product[0].'">';
- echo '<h4>'.$product[0].'</h4>';
- echo '<p>'.$product[2].'</p>';
- echo '<button>Buy Now</button>';
- echo '</div>';
- }
- ?>
- </div>
- </main>
- <footer>
- <p>Copyright 2021 Athletic Brand</p>
- <ul>
- <li><a href="#">Terms of Use</a></li>
- <li><a href="#">Privacy Policy</a></li>
- </ul>
- </footer>
- </body>
- </html>
File Description
- tst
- PHP Code
- 05 Jan-2023
- 1.81 Kb
You can Share it:
Latest PHP Pastes